13 lines
395 B
Rust
13 lines
395 B
Rust
use invidious::reqwest::blocking::Client;
|
|
use std::error::Error;
|
|
//use serde::{Deserialize, Serialize};
|
|
//use serde_json::Result;
|
|
|
|
|
|
pub fn inv() -> Result<String, Box<dyn Error>> {
|
|
let client = Client::new(String::from("https://invidious.projectsegfau.lt"));
|
|
let output = &client.video("5C_HPTJg5ek", None)?.format_streams[2].url;
|
|
println!("{}", output);
|
|
Ok(output.to_string())
|
|
}
|