Rust library to fetch YouTube content metadata. An attempt to mimic pafy but in Rust.
Put the below in your Cargo.toml
[dependencies]
rafy = "0.1"
```rust extern crate rafy;
use rafy::Rafy;
fn main() { let content = Rafy::new("https://www.youtube.com/watch?v=DjMkfARvGE8").unwrap(); println!("{}", content.videoid); println!("{}", content.title); println!("{}", content.rating); println!("{}", content.viewcount); } ```
For more examples check out the Documentation.
I am not very good at writing Rust code. If there is anything that can be improved or made more efficient, please send a PR.
Documentation improvements are also most welcome!
cargo test
The base code was adapted from rust-youtube-downloader by smoqadam, modified and further extended to suit the library accordingly.
The MIT License