A UDP torrent tracker scraper written in Python 3
Project description
Torrent Tracker Scraper
A UDP torrent tracker scraper written in Python 3
Installation
pipenv install torrent-tracker-scraper
pipenv shell
Usage
Pass in a list of infohashes
from torrent_tracker_scraper import scraper
scraper = scraper.Scraper(
infohashes=[
"82026E5C56F0AEACEDCE2D7BC2074A644BC50990",
"04D9A2D3FAEA111356519A0E0775E5EAEE9C944A",
]
)
results = scraper.scrape()
print(results)
[
...,
{
'tracker': 'udp://explodie.org:6969',
'results': [
{
'infohash': '82026E5C56F0AEACEDCE2D7BC2074A644BC50990',
'seeders': 246,
'completed': 0,
'leechers': 36
},
{
'infohash': '04D9A2D3FAEA111356519A0E0775E5EAEE9C944A',
'seeders': 7,
'completed': 0,
'leechers': 27
}
]
},
{
'tracker': 'udp//:bt-trace.adgk.net:6969',
'results': [
{
'infohash': '82026E5C56F0AEACEDCE2D7BC2074A644BC50990', 'error': 'Could not get stats for infohash [bt-trace.adgk.net:6969]'
},
{
'infohash': '04D9A2D3FAEA111356519A0E0775E5EAEE9C944A', 'error': 'Could not get stats for infohash [bt-trace.adgk.net:6969]'
}
],
'error': None
}
...
Get your scrapped information
Pass in a list of trackers
from torrent_tracker_scraper import scraper
scraper = scraper.Scraper(
trackers=["udp://explodie.org:6969/annouce"],
infohashes=[
"82026E5C56F0AEACEDCE2D7BC2074A644BC50990",
"04D9A2D3FAEA111356519A0E0775E5EAEE9C944A",
],
)
results = scraper.scrape()
print(results)
[
...,
{
'tracker': 'udp://explodie.org:6969',
'results': [
{
'infohash': '82026E5C56F0AEACEDCE2D7BC2074A644BC50990',
'seeders': 246,
'completed': 0,
'leechers': 36
},
{
'infohash': '04D9A2D3FAEA111356519A0E0775E5EAEE9C944A',
'seeders': 7,
'completed': 0,
'leechers': 27
}
]
},
...
Testing
pipenv install --dev
pipenv run pytest
Help/Contributing
-
Install dev dependencies
pipenv install --dev
-
Make your changes
-
Make sure your tests pass
pipenv run pytest
-
Create an issue here
https://github.com/project-mk-ultra/torrent-tracker-scraper/issues.
Contributors (in alphabetical order)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for torrent_tracker_scraper-4.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0035cefa4b7004e6ab13ad5ae74bc57fe254c706da2e8f8b053d283a9243001d |
|
MD5 | 1a4455d703b9111b2b6c4efc647da57c |
|
BLAKE2b-256 | 0e478fd3ba4fc955daf9de0c060483743f213e2a37822d8aeb940435027d454d |