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.1.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.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torrfetch-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 41516e56f0f37b9c0848d0fc6ba987aec87dd10d37310585f8e593d61a47a7f6
MD5 397b89db63c000a985b88856ac5a1ead
BLAKE2b-256 9777c3bd35dfb2c025611018d7d28d832b5a1e3c273ae402d64a91485efebaaf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torrfetch-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6fc206e89fcbce947cf3d23a6f8586608a0b2a131c31143fb6e0dfe5b0c0ca34
MD5 13cb51cadc815be342d2e1e0f79d018a
BLAKE2b-256 643bd2245b027867321d0386fea740fd3a472e5640bb9a1ffcccbc01fcd0beee

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