Skip to main content

A Python package to fetch torrent metadata from multiple sources

Project description

torrfetch

torrfetch is a Python package that lets you search torrents across multiple public torrent indexers with deduplication and relevance sorting. Designed for developers building CLI tools or automation scripts around torrent discovery.

Features

  • Search multiple torrent providers in parallel or fallback mode
  • Automatic deduplication of results
  • Smart scoring by title relevance and seeders
  • Fast and extensible provider interface

Providers

Currently supports:

  • The Pirate Bay
  • yts

Installation

pip install torrfetch

Usage

Parallel mode (default)

All providers are queried simultaneously, and the output is ranked by relevance and seeders

torrfetch.search("oppenheimer 2023 1080p", mode="parallel")

Fallback mode

Queries providers one by one, proceeding to the next if the current one is down or returns no results

torrfetch.search("oppenheimer", mode="fallback")

Restrict to specific providers

Use only to limit the search to a subset of sources (e.g., just YTS or YTS and Piratebay):

torrfetch.search("oppenheimer", only=["yts"])

Sample data returned

The first 30 results are returned, sorted by a combination of relevance and seeders:

[
  {
    "title": "Interstellar (2014)",
    "magnet": "magnet:?xt=urn:btih:...",
    "size": "2.2 GB",
    "uploaded": "2020-10-01",
    "uploader": "YTS",
    "category": "Movies",
    "seeders": 2145,
    "leechers": 198,
    "source": "yts"
  },
  {
    "title": "Interstellar.2014.1080p.BluRay.x264",
    "magnet": "magnet:?xt=urn:btih:...",
    "size": "3.1 GB",
    "uploaded": "2019-07-12",
    "uploader": "1337xUploader",
    "category": "Movies",
    "seeders": 1200,
    "leechers": 230,
    "source": "1337x"
  },
  ...
]

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

torrfetch-0.1.2.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torrfetch-0.1.2-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file torrfetch-0.1.2.tar.gz.

File metadata

  • Download URL: torrfetch-0.1.2.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for torrfetch-0.1.2.tar.gz
Algorithm Hash digest
SHA256 19adabfba2f24c575b57e9180cd3077bb5eaf63f2a0d949921aca71ef834879e
MD5 ef5570741cc93e831ffa675bddcde41d
BLAKE2b-256 fab3756796739cb9d23fe3dfa0396bc236b78c205599794409ae3512879133f2

See more details on using hashes here.

File details

Details for the file torrfetch-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: torrfetch-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for torrfetch-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 17836d429347a32365a1894635b7e0d48d1bcdb5386ba2bd63e649e3ca2a825e
MD5 42131abb763654054968f1f2bf20b8d6
BLAKE2b-256 43cba4d4e73c09c429ae5c36fda865bf97975a5101d9d20fedda238b2b03ebd8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page