#search #torrent #l337x

torrent_search

An unofficial torrent searching library in Rust

5 releases

0.3.3 May 5, 2021
0.3.2 Apr 20, 2021
0.3.1 Mar 10, 2021
0.3.0 Feb 26, 2021
0.1.0 Feb 19, 2021

#52 in #torrent

Download history 5/week @ 2024-03-19 14/week @ 2024-03-26 52/week @ 2024-04-02 6/week @ 2024-04-23 4/week @ 2024-04-30 2/week @ 2024-05-14 13/week @ 2024-05-28 6/week @ 2024-06-04

154 downloads per month
Used in 2 crates

MIT license

11KB
155 lines

Torrent Search

Build Status

Usage:

To search for a torrent, simply use the search_l337x function

use torrent_search::{search_l337x, TorrentSearchResult, TorrentSearchError};

#[tokio::main]
async fn main() {
   let debian_search_results = search_l337x("Debian ISO".to_string()).await.unwrap();

   for result in debian_search_results {
       println!("Name of torrent: {}\nMagnet: {}\nSeeders: {}\nLeeches: {}", result.name, result.magnet.unwrap(), result.seeders.unwrap(), result.leeches.unwrap());

   }
}

This will return Result<Vec<TorrentSearchResult>, TorrentSearchError>, which when unwrapped gives a Vector of TorrentSearchResults.

You can view more information about the data types of the structs here


lib.rs:

Usage:

To search for a torrent, simply use the search_l337x function

use torrent_search::{search_l337x, TorrentSearchResult, TorrentSearchError};

#[tokio::main]
async fn main() {
   let debian_search_results = search_l337x("Debian ISO".to_string()).await.unwrap();

   for result in debian_search_results {
       println!("Name of torrent: {}\nMagnet: {}\nSeeders: {}\nLeeches: {}", result.name, result.magnet.unwrap(), result.seeders.unwrap(), result.leeches.unwrap());

   }
}

This will return Result<Vec<TorrentSearchResult>, TorrentSearchError>, which when unwrapped gives a Vector of TorrentSearchResults

Dependencies

~6–19MB
~275K SLoC