A simple torrent tracker scraper
Project description
Tracker Scraper
A simple torrent tracker scraper
NOTE: Currently not working for http trackers (you can try but all my test cases gave bencode error), works for udp trackers. Working on fixing http tracker scrape, any valid help accepted.
Installation
pip install tracker-scraper
Usage
from tracker_scraper import scrape
scrape(
tracker='udp://exodus.desync.com:6969',
hashes=[
"2d88e693eda7edf3c1fd0c48e8b99b8fd5a820b2",
"8929b29b83736ae650ee8152789559355275bd5c"
]
)
scrape
Returns the list of seeds, peers and downloads a torrent info_hash has, according to the specified tracker
Args:
tracker
(str): The announce url for a tracker, usually taken directly from the torrent metadata.hashes
(list): A list of torrent info_hash's to query the tracker for
Returns:
A dict of dicts. The key is the torrent info_hash's from the 'hashes' parameter,
and the value is a dict containing "seeds", "peers" and "complete".
Example:
{
"2d88e693eda7edf3c1fd0c48e8b99b8fd5a820b2" : { "seeds" : "34", "peers" : "189", "complete" : "10" },
"8929b29b83736ae650ee8152789559355275bd5c" : { "seeds" : "12", "peers" : "0", "complete" : "290" }
}
Credits
Code taken from project m2t by Erin Drummond (erindru). Originally written in Python 2.7, updated code to Python 3+ and now using requests
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
Built Distribution
Hashes for tracker_scraper-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 292aa8dfe941891b6477fe0369ce31d86824562134662f50676f2ab3b6d5f95e |
|
MD5 | 3bd11f4240652d5e88165d1ad154be1b |
|
BLAKE2b-256 | ff1bdb642fef57e2733129035545d2a7dcb6c2f1785e804b200ab33ed38b4c13 |