Crate youtube_dl

Source
Expand description

§youtube_dl

A crate for running and parsing the JSON output of youtube-dl. Example usage:

use youtube_dl::YoutubeDl;
let output = YoutubeDl::new("https://www.youtube.com/watch?v=VFbhKZFzbzk")
  .socket_timeout("15")
  .run()
  .unwrap();

Re-exports§

pub use crate::downloader::download_yt_dlp;
pub use crate::model::*;

Modules§

downloader
Exposes a function to download the latest version of youtube-dl/yt-dlp.
model
Structs to represent the output of youtube-dl. The definitions in this module are mostly auto-generated from the JSON output format of youtube-dl.

Structs§

SearchOptions
Specifies where to search, how many results to fetch and the query. The count defaults to 1, but can be changed with the with_count method.
YoutubeDl
A builder to create a youtube-dl command to execute.

Enums§

Error
Errors that can occur during executing youtube-dl or during parsing the output.
SearchType
The search options currently supported by youtube-dl, and a custom option to allow specifying custom options, in case this library is outdated.
YoutubeDlOutput
Data returned by YoutubeDl::run. Output can either be a single video or a playlist of videos.