Expand description
§maguro
An async library for downloading and streaming media, with out-of-the-box support for YouTube.
§Example
use maguro;
use tokio::fs::OpenOptions;
// ...
// Get our video information and location the first format
// available.
let video_info = maguro::get_video_info("VfWgE7D1pYY").await?;
let format = video_info.all_formats().first().cloned()?;
// Open an asynchronous file handle.
let mut output = OpenOptions::new()
.read(false)
.write(true)
.create(true)
.open("maguro.mp4")
.await?;
// Download the video.
format.download(&mut output).await?;Modules§
- serde
- Extensions to serde for deserializing unsupported types.
Structs§
- Format
- Describes a single streaming format for a YouTube video.
- Info
Response - YouTube get_video_info response.
- Streaming
Data - The set of sources available to download a YouTube video with.
- Video
Details - Details about some YouTube video.
Functions§
- get_
video_ info - Acquires the InfoResponse struct for a given video ID.