This project contains a userscript that fetches IMDB information for movie titles on torrent sites and tests parsing logic for movie/series titles.
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_KEYin the script) - Tampermonkey or Greasemonkey browser extension
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.txtwith detailed log
Usage:
node test_parsing.jsOutput:
- Console: Summary counts (Total, Movies, Series, Unknown, Pass)
- result.txt: Detailed summary + log of each parsed title
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
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
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.
The parsing logic handles:
- Extracting title from anchor tags with
data-movie-hashattribute - 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
- Install Tampermonkey extension in your browser
- Replace
OMDB_API_KEYinapp.jswith a valid key from https://www.omdbapi.com/apikey.aspx - Load
app.jsas a userscript in Tampermonkey - Visit a supported torrent site - the script will automatically activate
- For
app.js: Tampermonkey/Greasemonkey - For
test_parsing.js: Node.js withfsmodule (built-in)
- OMDB API: Free key required for movie data fetching (1000 requests/day)
- No API key needed for title parsing/testing
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
This project is for educational purposes only. Use at your own risk.