Crate ytb_downloader

source ·
Expand description

ytb-downloader

A library for downloading Youtube videos

Examples

let source = get_available_sources("https://www.youtube.com/watch?v=pqhfyrW_BEA").await?
    .into_iter().next().unwrap();
const OUTPUT_FILE: &str = "download.m4a"; 
download_video!(&source, OUTPUT_FILE).await;
let source = get_available_sources("https://www.youtube.com/watch?v=pqhfyrW_BEA").await?
    .into_iter().next().unwrap();
const OUTPUT_FILE: &str = "download.m4a"; 
download_video(&source, OUTPUT_FILE, None).await;

Modules

  • Error types of ytb-downloader crate
  • Functions related to requests to Youtube

Macros

  • Helper macro to call download_video without the chunk_size parameter

Functions

  • Downloads a video to an output file given a download source and optionally a chunk size for the partial requests
  • Gets available download sources and formats for a video