Skip to main content

Automatically removes trackers from active qBittorrent downloads.

Project description

TrackersRemover-qBittorrent 🗑️

TrackersRemover-qBittorrent is a Python script that connects to qBittorrent's Web UI and removes trackers from torrents once their download speed exceeds a configurable threshold. This can help improve privacy or reduce reliance on certain trackers.


Features

  • Starts qBittorrent (Windows and macOS)
  • Connects to qBittorrent Web UI via qbittorrent-api.
  • Lists torrents and their trackers.
  • Removes non-ignored trackers from torrents actively downloading above a minimum speed.
  • Configurable ignored trackers list and minimum download speed threshold.

Installation via PyPI

  1. Start qBittorrent and configure qBittorrent Web UI

  2. Install Python >=3.8 if it is not done

  3. Open CMD (Terminal) and install the python package directly using pip:

    pip install trackersremoverqbt
    

Run in CMD

Simply run it from the command line in CMD:

trackersremoverqbt
# or
trqbt

Available options:

# Exemple (works with trqbt instead of trackersremoverqbt)
trackersremoverqbt --host localhost --port 8080 --username admin --password 123456 --no-verify True --min-dl-speed 15 --launch-qbt True --ignored-trackers "tracker1.example.com" "tracker2.example.com"
# or
trackersremoverqbt -H localhost -P 8080 -U admin -PSW 123456 --no-verify True -MDL 15 -QBT True --ignored-trackers "tracker1.example.com" "tracker2.example.com"

# For version
trackersremoverqbt -V
# or
trackersremoverqbt --version

# For help
trackersremoverqbt --help
Argument Alias(s) Description Default Value
--host -H qBittorrent Web UI address localhost
--port -P Web UI port 8080
--username -U Web UI username admin
--password -PSW Web UI password 123456
--no-verify Disable SSL certificate verification True (verification disabled by default)
--min-dl-speed -MDL Minimum download speed in KB/s to trigger tracker removal 10
--ignored-trackers Additional list of trackers to ignore (added to defaults) [] (empty by default)
--launch-qbt -QBT Launch qBittorrent if not running True
--version -V Show program version and exit
--help Show this help message and exit

Run in python script

You can use trackersremoverqbt as a Python module instead of via command line:

Example

from trackersremoverqbt.core import main as trqbt

trqbt(
    host="localhost",
    port=8080,
    username="admin",
    password="123456",
    no_verify=True,
    min_dl_speed=10,
    ignored_trackers=[
        "http://tracker.example.com/announce",
        "http://tracker.another.net/announce"
    ],
    launch_qbt=True
)

All CLI arguments are available as function parameters.


Using a whitelist_trackers.txt file

If you have a list of trusted trackers in a file, you can load them like this:

whitelist_trackers.txt content:
http://tracker.example1.com/announce
http://tracker.example2.com/announce
http://tracker.example3.com/announce
http://tracker.another.net/announce
Example:
from trackersremoverqbt.core import main as trqbt

# Load whitelist from file
with open("whitelist_trackers.txt", "r", encoding="utf-8") as f:
    whitelist = [line.strip() for line in f if line.strip()]

# Call main with whitelist
trqbt(ignored_trackers=whitelist)

PoC

The script runs in a loop, periodically checking torrents and removing trackers that meet the criteria. It outputs a formatted table of torrents with their trackers and logs removal actions.

alt text

alt text

alt text

Disclaimer

Removing trackers from torrents goes against the principles of traditional P2P sharing. By using this plugin, you acknowledge and agree:

  • You understand the implications of modifying torrent behavior.
  • You are solely responsible for any consequences that arise from using this plugin.
  • The author(s) of TrackersRemover are not responsible for any misuse or unlawful use of this software.

Notes

This tool is intended for advanced users aware of torrenting implications.

Tested on Python 3.12 and qBittorrent Web UI 5.x.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trackersremoverqbt-0.3.2.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trackersremoverqbt-0.3.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file trackersremoverqbt-0.3.2.tar.gz.

File metadata

  • Download URL: trackersremoverqbt-0.3.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for trackersremoverqbt-0.3.2.tar.gz
Algorithm Hash digest
SHA256 e5a818aa41af122bde58baa698b894fd0cfcc6b7b5687a7a222e3b98265bf856
MD5 d71684e2d36a1f9b3d12c8be5ab2f275
BLAKE2b-256 323c401d9185eac09f6e0c43552c2b86f08199f023b8d1d77bb4b23651081203

See more details on using hashes here.

File details

Details for the file trackersremoverqbt-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for trackersremoverqbt-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e9e335e2bf0088779689ffa56652bbb4fa2e0d75961ca3577bac51861b7a71b8
MD5 2c5d9a2dc67f37851ee14458ae2f542c
BLAKE2b-256 c183dfd1a2cbd8e3cfb595a2fa30cf4abeb2db0c4ea79425db47f401a23972ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page