Crates.io | youtube-metadata |
lib.rs | youtube-metadata |
version | 0.2.0 |
source | src |
created_at | 2021-04-18 10:04:29.847793 |
updated_at | 2021-06-12 11:40:04.536293 |
description | YouTube video metadata fetcher |
homepage | |
repository | https://github.com/Trivernis/youtube-metadata-rs |
max_upload_size | |
id | 386073 |
size | 9,552 |
Fetch simple YouTube Video metadata with ease.
use youtube_metadata::get_video_information;
let information = get_video_information("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
.await
.unwrap();
assert_eq!(information.id, "dQw4w9WgXcQ".to_string());
assert_eq!(
information.url,
"https://www.youtube.com/watch?v=dQw4w9WgXcQ".to_string()
);
assert_eq!(information.uploader, "RickAstleyVEVO".to_string());
assert_eq!(
information.title,
"Rick Astley - Never Gonna Give You Up (Video)".to_string()
);
assert_eq!(
information.thumbnail,
Some("https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg".to_string())
);
MIT