Skip to content

Latest commit

 

History

History
57 lines (35 loc) · 1.51 KB

README.md

File metadata and controls

57 lines (35 loc) · 1.51 KB

TPB

Unofficial Python API for ThePirateBay.

Version Downloads

Installation

$ pip install ThePirateBay

If you love and use TPB, please consider donating via gittip. Any support is appreciated!

Classes

TPB

The class that parses the torrent listing page, and builds up all Torrent objects.

Methods

get_recent_torrents() - Returns a list of Torrent objects from the 'recent' page of TPB

search(query, category=0) - Searches TPB for the passed query and returns a list of Torrents

Torrent

Represents one single torrent on TPB

Methods

print_torrent() - Print the details of a torrent

Story details

  • title # the title of the torrent
  • url # TPB url for the torrent
  • category # the main category
  • sub_category # the sub category
  • magnet_link # magnet download link
  • torrent_link # .torrent download link
  • created # uploaded date time
  • size # size of torrent
  • user # username of uploader
  • seeders # number of seeders
  • leechers # number of leechers

Contribute

If you want to add any new features, or improve existing ones, feel free to send a pull request!