YouTube video metadata fetcher
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Vilgot Fredenberg 2d32d70d91
Reimagine model & add search method.
Internally no longer rely on parsing HTML but instead parse JSON (using
regex to grep the JSON from HTLM).

Playlist support is commented out / hidden due to the complexity of
implemented it. Methods exposing this functionality can be added later.
3 years ago
.github/workflows Add GITHUB ACTIONS 3 years ago
src Reimagine model & add search method. 3 years ago
.gitignore Remove initialData.json 4 years ago
Cargo.toml Reimagine model & add search method. 3 years ago
LICENSE Create LICENSE 4 years ago
README.md Update README.md 4 years ago

README.md

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