yts-lib 0.1.0

Library to search YTS movies info and torrent links
Documentation

yts-lib

Library to search YTS movies info and torrent links

Description

This crate provides an interface for searching and retrieving movie information from the YTS API, including filtering options, pagination, and torrent details. It offers both asynchronous and blocking (synchronous) interfaces, with flexible filtering and ordering options. It uses a web scraper to build the api

Usage

Add this crate to your Cargo.toml:

[dependencies]
yts-lib = "0.1.0"

Enable blocking feature if needed

[dependencies]
yts-lib = { version = "0.1.0", features = ["blocking"] }

Async Example (default)

use yts::{Filters, OrderBy, Year, Yts};

#[tokio::main]
async fn main() -> yts::Result {
    let yts = Yts::default();
    let response = yts
        .search_with_filter(
            "the godfather",
            Filters::default()
                .year(Year::Range1970to1979)
                .order_by(OrderBy::Rating)
                .build(),
        )
        .await?;

    println!("{response:#?}");

    // Getting the torrents of the first movie
    let torrents = yts
        .torrents(&response.movies[0])
        .await?;

    println!("{torrents:#?}");

    Ok(())
}

Details

Features

  • Default async search. Blocking search available too
  • Search by movie name and/or filters (quality, genre, rating, page, ordering and year)
  • Obtain not only info and metadata but also a torrent download link of the movie.

Docs

Find all the configuration options in the full documentation.


Donate

  • Bitcoin (QR) 1GqdJ63RDPE4eJKujHi166FAyigvHu5R7v
  • Paypal