yts-movies

Crates.ioyts-movies
lib.rsyts-movies
version0.2.0
created_at2025-07-06 15:30:34.126916+00
updated_at2025-09-15 13:51:25.350054+00
descriptionLibrary to search YTS movies info and torrent links
homepagehttps://github.com/javiorfo/yts-movies#readme
repositoryhttps://github.com/javiorfo/yts-movies
max_upload_size
id1740199
size90,803
Javier Orfo (javiorfo)

documentation

README

yts-movies

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-movies = "0.1.1"

Enable blocking feature if needed

[dependencies]
yts-movies = { version = "0.1.1", features = ["blocking"] }

Async Example (default)

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

#[tokio::main]
async fn main() -> yts_movies::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
Commit count: 13

cargo fmt