This commit is contained in:
2025-07-10 10:01:44 +02:00
parent b3c9b3c259
commit 4ca3d9073e
4 changed files with 9 additions and 7 deletions

View File

@@ -10,7 +10,6 @@ reqwest = { version = "0.12", features = ["json"] }
tokio = { version = "1", features = ["full"] }
lettre = "0.11"
serde = { version = "1.0", features = ["derive"] }
serde_yaml_ng = "0.9"
serde_json = "1"
google-youtube3 = "*"

View File

@@ -2,4 +2,6 @@
sends me an email every monday with all the new videos from channels i like on youtbue
# status
man, idk why but the request for my raw content just gives {} rn. i'm too tired to figure it out, it's for tomorrow
can read the json, now to actually implement the youtube api calls.
Prolly just gonna call the api directly with reqwest.
add <option> datafields in the struct. cleanup the "listje"

View File

@@ -1,14 +1,11 @@
use serde::Deserialize;
#[derive(Deserialize)]
struct listje {
items: Vec<Channel>,
}
#[derive(Deserialize)]
struct Channel {
id: String,
name: String,
kind: String
channel
}
#[tokio::main]
@@ -25,5 +22,8 @@ async fn main() {
// Err(error) => println!("NOPE"),
// }; //
let channels =serde_json::from_str::<Vec<Channel>>(&resp).unwrap();
for i in channels {
println!{"{:#?}", i.name};
}
}

View File

@@ -1,5 +1,6 @@
[
{ "name":"squibquib",
{
"name":"squibquib",
"id": "UC-9-sjOyxoDCdQlVzObzGsw",
"kind": "letsplay"
},