IMDB info + .torrent from magnet

Show IMDB info on torrent sites and add .torrent download links for magnets

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
quantavil
今日安裝
0
安裝總數
5
評價
0 0 0
版本
4.1.1
建立日期
2025-10-04
更新日期
2025-11-15
尺寸
24.5 KB
授權條款
MIT
腳本執行於

IMDB Info + Torrent Script Project

This project contains a userscript that fetches IMDB information for movie titles on torrent sites and tests parsing logic for movie/series titles.

NOTE : USE YOUR OWN API KEY : Uses the OMDb API to fetch movie data (plot, director, rating, etc.).

Files

app.js

A userscript compatible with Tampermonkey/Greasemonkey that:

  • Scrapes movie titles from torrent site pages
  • Fetches IMDB API data for ratings, plot, cast, etc.
  • Displays hover popups with movie information
  • Adds torrent download links (magnet to .torrent conversion)
  • Works on various torrent sites (The Pirate Bay, 1337x, RARBG, etc.)

Requirements:

  • OMDb API key (replace OMDB_API_KEY in the script)
  • Tampermonkey or Greasemonkey browser extension

test_parsing.js

A Node.js script that tests the movie/series title parsing logic from the userscript.

Purpose:

  • Reads HTML data from todo.txt
  • Extracts movie titles from torrent site HTML structure
  • Parses titles to determine movie/series format
  • Counts successful parsings vs failures
  • Outputs results to result.txt with detailed log

Usage:

node test_parsing.js

Output:

  • Console: Summary counts (Total, Movies, Series, Unknown, Pass)
  • result.txt: Detailed summary + log of each parsed title

todo.txt

Sample HTML data containing 100 movie titles scraped from a torrent site.

  • Contains <tr> elements with movie names
  • Used as input for the parsing test
  • All entries are valid movie titles with years

result.txt

Output file generated by running test_parsing.js

  • Contains parsing test results
  • Shows how many titles passed/failed
  • Includes detailed log of title -> parsed title (year) mappings

Testing Results

Latest test run on todo.txt:

  • Total titles: 100
  • Movies: 100 (100%)
  • Series: 0 (0%)
  • Unknown: 0 (0%)
  • Pass rate: 100%

All movie titles in the sample data were successfully parsed, with clean title names and valid years extracted.

Script Logic

The parsing logic handles:

  • Extracting title from anchor tags with data-movie-hash attribute
  • Removing quality tags (1080p, x265, WEBRip, etc.)
  • Detecting years (19XX/20XX) for movies
  • Detecting SXXEXX or XxXX patterns for series (though none in sample data)
  • Cleaning punctuation and extra spaces

Installation

  1. Install Tampermonkey extension in your browser
  2. Replace OMDB_API_KEY in app.js with a valid key from https://www.omdbapi.com/apikey.aspx
  3. Load app.js as a userscript in Tampermonkey
  4. Visit a supported torrent site - the script will automatically activate

Dependencies

  • For app.js: Tampermonkey/Greasemonkey
  • For test_parsing.js: Node.js with fs module (built-in)

API Keys

  • OMDB API: Free key required for movie data fetching (1000 requests/day)
  • No API key needed for title parsing/testing

Supported Sites

The userscript works on:

  • thepiratebay.org
  • 1337x.to
  • rarbg.to
  • zooqle.com
  • torlock.com
  • eztv.io
  • demonoid.is
  • toorgle.com
  • kickass.to
  • kat.cr
  • Most sites using magnet links

License

This project is for educational purposes only. Use at your own risk.