magneto
Magneto is a library for searching torrents across multiple providers.
It provides a unified interface for querying torrent metadata and integrating
custom providers.
Features
- Fully async-powered using
reqwestandtokio. - Query multiple torrent search providers simultaneously.
- Retrieve torrent results in a unified format.
- Add custom providers with minimal effort.
Supported providers
- Knaben: A multi search archiver, acting as a cached proxy towards multiple different trackers.
- PirateBay: The galaxy’s most resilient Public BitTorrent site.
- YTS: A public torrent site specialising in HD movies of small size.
Usage
Add this to your Cargo.toml:
[]
= { = "1", = ["full"] }
= "0.2"
Then:
use ;
async
Specifying search providers
use ;
// By default, all built-in providers are used (Knaben, PirateBay, Yts)
let magneto = new;
// You can specify which providers to use like this
let magneto =
with_providers;
// Or like this
let magneto = default
.add_provider
.add_provider;
Search request parameters
use ;
// You can add categories to filter your search results
let request = new
.add_category
.add_categories;
// Or initialize the request like this for more customization
let request = SearchRequest ;
Add a custom provider
use ;
;
async