3 unstable releases
0.2.0 | Jun 12, 2021 |
---|---|
0.1.1 | Apr 18, 2021 |
0.1.0 | Apr 18, 2021 |
#291 in Video
8KB
134 lines
youtube-metadata-rs
Fetch simple YouTube Video metadata with ease.
Example
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())
);
License
MIT
Dependencies
~6–18MB
~278K SLoC