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_torrents("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_torrents("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_torrents("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.5.tar.gz (5.8 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.5-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torrfetch-0.1.5.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for torrfetch-0.1.5.tar.gz
Algorithm Hash digest
SHA256 75b17c4c01b4f9e26a93079c2148fd8e69502a63c02367488d980e391a75bae1
MD5 6e33fc7f7d1c8e1ddfec43c442a84277
BLAKE2b-256 666c14588d3ba278a35158c9e85e0301fdc5a1e6e2f75504b1672324dd245192

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torrfetch-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for torrfetch-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1e227109b906c2e47fc29f94695a163a58747c81242180d26cc0b77c9d5b161b
MD5 68003d935cdb25ac2cb633069a8ee901
BLAKE2b-256 c33c71e8414c9138b79c146637dcd4eeaf5f7fc94aed78360709e58f38a5c7cd

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