This script is designed to search for torrents across multiple sites using TMDb IDs. It provides functionality to either specify a TMDb ID manually or read from a .json
file containing multiple TMDb IDs. The script checks whether torrents corresponding to these IDs are available on various torrent sites and outputs the results in an organized format.
- Search Modes: Choose between Movies or Shows, and specify a TMDb ID manually or read from a
.json
file. - Multi-Site Support: Search for torrents on multiple torrent sites including BLU, ATH, ULCX, LST, FNP and OTW.
- TMDb Data Handling: Automatically download the latest TMDb IDs file if it is missing or empty, and remove processed entries from the
.json
file to avoid redundant searches. - Detailed Output: Get organized results with media name, file size, media type, and resolution.
- Error Handling: Includes robust error handling and user prompts to guide through the process.
- String Searching: When searching for a TMDb ID, you now have the option to search for a specific string, such as '2160p' or 'FLUX'.
- Continuous Search: You can now continue searching as the script runs, with a prompt to either proceed or stop after each set of parses.
- Python 3.x
- Required Python packages:
requests
rich
pytz
Install the required packages using pip:
pip3 install --user -U -r requirements.txt
- Clone the repository.
- Place your site's API keys in the
config.json
file in your main directory.- You SHOULD remove any sites from the
config.json
file that you do not plan to use. Failure to do so will result in an error, and the script will exclude that site from the output. - If the
config.json
file is not found, a new one will be automatically generated with default values. You will then need to manually enter the API keys for each site you intend to use.
- You SHOULD remove any sites from the
- Ensure that your
.json
files containing TMDb IDs (movies_tmdb_ids.json
andshows_tmdb_ids.json
) are in the same directory as the script.
Note
If the appropriate .json
files are not found, the script will generate an error and provide an option to download them directly through the script. This is recommended, as it ensures that the correct and most recent export from TMDb is downloaded and properly renamed for use.
-
Select Search Type: Upon running the script, you will be prompted to choose whether you want to search for Movies or Shows.
-
Specify Search Mode: You can choose to either:
- Specify a TMDb ID manually: Enter a TMDb ID, and the script will search for it across the supported torrent sites.
- Read from a
.json
file: The script will read TMDb IDs from the corresponding.json
file and process them.
-
Search Execution: The script will search for torrents that match the TMDb ID(s) and display results, including:
- Media name
- File size (in GiB)
- Media type (e.g., Remux, WEB-DL)
- Resolution (e.g., 1080p, 2160p)
- Seeders & Leechers (e.g., S73/L12)
- Freeleech (e.g., ⭐ 50%)
-
Post-Search Options: After the search, you can choose to remove the processed TMDb ID(s) from the
.json
file to avoid future redundant searches.
Note
This applies exclusively when using the 'json' search type. When searching by 'id', the script will not prompt you to remove entries from the TMDb IDs file.
- Continue Search: The script will prompt you to choose whether to continue searching for additional TMDb IDs or to exit the script.
python main.py
- Choose Search Type:
Movies
orShows
. - Choose Search Mode:
id
orjson
. - Specify TMDb ID (if in
id
mode): Enter the TMDb ID you'd like to search for.
If the script detects that the .json
file is empty or missing, it will prompt you to download the latest TMDb IDs file. The file is downloaded based on the current date to ensure the most up-to-date information.
Tip
To obtain a new, updated TMDb IDs .json
file, simply delete or rename the old file from the directory and run the script. The script will then prompt you to download the latest version before proceeding with further processing.
Ensure that you have valid API keys for the supported torrent sites. Without these keys, the script will return an error for the specific site(s) where the API failed, and no data from that site will be included in the output when processing TMDb ID(s).
The script includes error handling for:
- Missing API keys
- Invalid or missing
config.json
file - Invalid TMDb IDs
- Network issues while fetching torrent data
- Issues with downloading or processing the TMDb IDs
.json
file - & More!
If you have suggestions or want to contribute, feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Ensure you follow the API usage guidelines of the supported torrent sites to avoid rate limiting or being banned.
- The script is designed to be user-friendly, with prompts and feedback to guide you through the search process.
Copyright © 2024 - RegEdits Torrenting