rusty_ytdl

[![crates.io](https://img.shields.io/crates/v/rusty_ytdl.svg?style=for-the-badge)](https://crates.io/crates/rusty_ytdl) [![Released API docs](https://img.shields.io/badge/docs.rs-rusty__ytdl-C36241?style=for-the-badge)](https://docs.rs/rusty_ytdl)

Youtube downloading module written with pure Rust. Download videos blazing-fast without getting stuck on Youtube download speed (Downloads 20MB video files in just 10 seconds!)

Overview

Roadmap

Usage

```rust,ignore use rustyytdl::info::download; use rustyytdl::structs::DownloadOptions;

[tokio::main]

async fn main() { let videourl = "https://www.youtube.com/watch?v=FZ8BxMU3BYc"; // FZ8BxMU3BYc works too! let videobuffer: Vec = download(video_url,None, DownloadOptions::default()).await.unwrap();

// Do what you want whit video buffer vector println!("{:#?}",video_buffer); } ```

or get only video informations

```rust,ignore use rustyytdl::info::getinfo; use rustyytdl::utils::chooseformat; use rusty_ytdl::structs::VideoOptions;

[tokio::main]

async fn main() { let videourl = "https://www.youtube.com/watch?v=FZ8BxMU3BYc"; // FZ8BxMU3BYc works too! let videoinfo = getinfo(videourl,None).await; // Also works with live videos!!

println!("{:#?}",videoinfo); /* VideoInfo { ... videodetails: VideoDetails, formats: Vec, related_videos: Vec } */

let videooptions = VideoOptions::default(); let format = chooseformat(&videoinfo.unwrap().formats,&videooptions);

// Get a format by VideoOptions filter parameter println!("{:#?}",format); } ```

Limitations

rusty-ytdl cannot download videos that fall into the following

Generated download links are valid for 6 hours, and may only be downloadable from the same IP address.

Installation

bash cargo add rusty_ytdl

Or add the following to your Cargo.toml file:

toml [dependencies] rusty_ytdl = "0.1.0"