Skip to main content

A UDP torrent tracker scraper written in Python 3

Project description

Torrent Tracker Scraper

A UDP torrent tracker scraper written in Python 3

Jenkins PyPI version License: LGPL v3

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
            }
        ]
    },
    ...

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

Use the normal GitHub bug reporting flow i.e Create an issue here https://github.com/project-mk-ultra/torrent-tracker-scraper/issues.

Fork the code, make your changes and create a pull request.

Contributors

  1. https://github.com/dessalines

Project details


Download files

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

Files for torrent-tracker-scraper, version 3.1.2
Filename, size File type Python version Upload date Hashes
Filename, size torrent-tracker-scraper-3.1.2.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page