parsing-torrent-domains

Parses torrent domains.


Keywords
parsing_torrent_domains
License
MIT
Install
pip install parsing-torrent-domains==0.1.0

Documentation

Parsing Torrent Domains

Python package to parse btdb, eztv, limetorrents, thepiratebay, zooqle html pages into useful python dictionaries.

Features

Search page parse:
  • [x] btdb
  • [x] eztv
  • [x] limetorrents
  • [x] thepiratebay
  • [x] zooqle
Home page parse:
  • [x] eztv
  • [x] limetorrents
  • [ ] zooqle

Usage

Simply pass in the html into the parse_search_page() method.

The domain's parse_search_page(html) method will yield a generator object:

>>> import parsing_torrent_domains as parsers
>>> parsers.ThePirateBay.parse_search_page('html')
 <generator object ThePirateBay.parse_search_page at 0x...>
>>>
>>> #torrents is a list of dictionaries.
>>> torrents = list(parsers.ThePirateBay.parse_search_page('html'))

As pages are parsed, trackers are gathered from the magnet links. You can disable this feature with the following:

>>> import parsing_torrent_domains as parsers
>>>
>>> # Trackers are saved:
>>> torrents = list(parsers.ThePirateBay.parse_search_page('html'))
>>> trackers = parsers.trackers #NOT empty
>>>
>>> # Trackers are NOT saved:
>>> torrents = list(parsers.ThePirateBay.parse_search_page('html', False))
>>> trackers = parsers.trackers #empty

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.