Compare commits

..

2 commits

Author SHA1 Message Date
2254b79cd6 fix: add support for upcoming channel videos 2022-09-27 17:11:01 +02:00
49f3aa3577 docs: more model documentation 2022-09-27 16:31:38 +02:00
16 changed files with 13231 additions and 31 deletions

View file

@ -205,6 +205,7 @@ async fn channel_videos(testfiles: &Path) {
("shorts", "UCh8gHdtzO2tXd593_bjErWg"), // shorts and livestreams are rendered differently ("shorts", "UCh8gHdtzO2tXd593_bjErWg"), // shorts and livestreams are rendered differently
("live", "UChs0pSaEoNLV4mevBFGaoKA"), ("live", "UChs0pSaEoNLV4mevBFGaoKA"),
("empty", "UCxBa895m48H5idw5li7h-0g"), ("empty", "UCxBa895m48H5idw5li7h-0g"),
("upcoming", "UCcvfHa-GHSOHFAjU0-Ie57A"),
] { ] {
let mut json_path = testfiles.to_path_buf(); let mut json_path = testfiles.to_path_buf();
json_path.push("channel"); json_path.push("channel");

View file

@ -141,6 +141,9 @@ pub async fn generate_locales(project_root: &Path) {
let (languages, countries) = get_locales().await; let (languages, countries) = get_locales().await;
let code_head = r#"// This file is automatically generated. DO NOT EDIT. let code_head = r#"// This file is automatically generated. DO NOT EDIT.
//! Languages and countries
use std::{fmt::Display, str::FromStr}; use std::{fmt::Display, str::FromStr};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
@ -177,28 +180,41 @@ impl FromStr for Country {
} }
"#; "#;
let mut code_langs = let mut code_langs = r#"/// Available languages
r#"#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[serde(rename_all = "lowercase")] #[serde(rename_all = "lowercase")]
pub enum Language { pub enum Language {
"#.to_owned(); "#
.to_owned();
let mut code_countries = let mut code_countries = r#"/// Available countries
r#"#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[serde(rename_all = "UPPERCASE")] #[serde(rename_all = "UPPERCASE")]
pub enum Country { pub enum Country {
"#.to_owned(); "#
.to_owned();
let mut code_lang_array = format!("pub const LANGUAGES: [Language; {}] = [\n", languages.len()); let mut code_lang_array = format!(
let mut code_country_array = "/// Array of all available languages\npub const LANGUAGES: [Language; {}] = [\n",
format!("pub const COUNTRIES: [Country; {}] = [\n", countries.len()); languages.len()
);
let mut code_country_array = format!(
"/// Array of all available countries\npub const COUNTRIES: [Country; {}] = [\n",
countries.len()
);
let mut code_lang_names = r#"impl Language { let mut code_lang_names = r#"impl Language {
/// Get the native name of the language
///
/// Examples: "English (US)", "Deutsch", "中文 (简体)"
pub fn name(&self) -> &str { pub fn name(&self) -> &str {
match self { match self {
"# "#
.to_owned(); .to_owned();
let mut code_country_names = r#"impl Country { let mut code_country_names = r#"impl Country {
/// Get the English name of the country
///
/// Examples: "United States", "Germany"
pub fn name(&self) -> &str { pub fn name(&self) -> &str {
match self { match self {
"# "#

View file

@ -1,4 +1,5 @@
use anyhow::{anyhow, bail, Result}; use anyhow::{anyhow, bail, Result};
use chrono::TimeZone;
use serde::Serialize; use serde::Serialize;
use url::Url; use url::Url;
@ -325,6 +326,7 @@ fn map_videos(
let is_live = toverlays.is_live(); let is_live = toverlays.is_live();
let is_short = toverlays.is_short(); let is_short = toverlays.is_short();
let to = toverlays.try_swap_remove(0); let to = toverlays.try_swap_remove(0);
Some(ChannelVideo { Some(ChannelVideo {
id: video.video_id, id: video.video_id,
title: video.title, title: video.title,
@ -334,15 +336,26 @@ fn map_videos(
}), }),
thumbnail: video.thumbnail.into(), thumbnail: video.thumbnail.into(),
publish_date: video publish_date: video
.published_time_text .upcoming_event_data
.as_ref() .as_ref()
.and_then(|txt| timeago::parse_timeago_or_warn(lang, txt, &mut warnings)), .map(|upc| {
chrono::Local.from_utc_datetime(&chrono::NaiveDateTime::from_timestamp(
upc.start_time,
0,
))
})
.or_else(|| {
video.published_time_text.as_ref().and_then(|txt| {
timeago::parse_timeago_or_warn(lang, txt, &mut warnings)
})
}),
publish_date_txt: video.published_time_text, publish_date_txt: video.published_time_text,
view_count: video view_count: video
.view_count_text .view_count_text
.map(|txt| util::parse_numeric(&txt).unwrap_or_default()), .map(|txt| util::parse_numeric(&txt).unwrap_or_default()),
is_live, is_live,
is_short, is_short,
is_upcoming: video.upcoming_event_data.is_some(),
}) })
} }
response::VideoListItem::ContinuationItemRenderer { response::VideoListItem::ContinuationItemRenderer {
@ -632,6 +645,7 @@ mod tests {
#[case::shorts("shorts", "UCh8gHdtzO2tXd593_bjErWg")] #[case::shorts("shorts", "UCh8gHdtzO2tXd593_bjErWg")]
#[case::live("live", "UChs0pSaEoNLV4mevBFGaoKA")] #[case::live("live", "UChs0pSaEoNLV4mevBFGaoKA")]
#[case::empty("empty", "UCxBa895m48H5idw5li7h-0g")] #[case::empty("empty", "UCxBa895m48H5idw5li7h-0g")]
#[case::upcoming("upcoming", "UCcvfHa-GHSOHFAjU0-Ie57A")]
fn t_map_channel_videos(#[case] name: &str, #[case] id: &str) { fn t_map_channel_videos(#[case] name: &str, #[case] id: &str) {
let filename = format!("testfiles/channel/channel_videos_{}.json", name); let filename = format!("testfiles/channel/channel_videos_{}.json", name);
let json_path = Path::new(&filename); let json_path = Path::new(&filename);
@ -647,9 +661,16 @@ mod tests {
"deserialization/mapping warnings: {:?}", "deserialization/mapping warnings: {:?}",
map_res.warnings map_res.warnings
); );
insta::assert_ron_snapshot!(format!("map_channel_videos_{}", name), map_res.c, {
".content.items[].publish_date" => "[date]", if name == "upcoming" {
}); insta::assert_ron_snapshot!(format!("map_channel_videos_{}", name), map_res.c, {
".content.items[1:].publish_date" => "[date]",
});
} else {
insta::assert_ron_snapshot!(format!("map_channel_videos_{}", name), map_res.c, {
".content.items[].publish_date" => "[date]",
});
}
} }
#[test] #[test]

View file

@ -8,6 +8,7 @@ mod response;
mod video_details; mod video_details;
#[cfg(feature = "rss")] #[cfg(feature = "rss")]
#[cfg_attr(docsrs, doc(cfg(feature = "rss")))]
mod channel_rss; mod channel_rss;
use std::fmt::Debug; use std::fmt::Debug;

View file

@ -731,18 +731,6 @@ mod tests {
assert!(player_data.expires_in_seconds > 10000); assert!(player_data.expires_in_seconds > 10000);
} }
#[tokio::test]
async fn tmp() {
let rp = RustyPipe::builder().strict().build();
let player_data = rp
.query()
.player("tVWWp1PqDus", ClientType::Desktop)
.await
.unwrap();
dbg!(&player_data);
}
#[test] #[test]
fn t_cipher_to_url() { fn t_cipher_to_url() {
let signature_cipher = "s=w%3DAe%3DA6aDNQLkViKS7LOm9QtxZJHKwb53riq9qEFw-ecBWJCAiA%3DcEg0tn3dty9jEHszfzh4Ud__bg9CEHVx4ix-7dKsIPAhIQRw8JQ0qOA&sp=sig&url=https://rr5---sn-h0jelnez.googlevideo.com/videoplayback%3Fexpire%3D1659376413%26ei%3Dvb7nYvH5BMK8gAfBj7ToBQ%26ip%3D2003%253Ade%253Aaf06%253A6300%253Ac750%253A1b77%253Ac74a%253A80e3%26id%3Do-AB_BABwrXZJN428ZwDxq5ScPn2AbcGODnRlTVhCQ3mj2%26itag%3D251%26source%3Dyoutube%26requiressl%3Dyes%26mh%3DhH%26mm%3D31%252C26%26mn%3Dsn-h0jelnez%252Csn-4g5ednsl%26ms%3Dau%252Conr%26mv%3Dm%26mvi%3D5%26pl%3D37%26initcwndbps%3D1588750%26spc%3DlT-Khi831z8dTejFIRCvCEwx_6romtM%26vprv%3D1%26mime%3Daudio%252Fwebm%26ns%3Db_Mq_qlTFcSGlG9RpwpM9xQH%26gir%3Dyes%26clen%3D3781277%26dur%3D229.301%26lmt%3D1655510291473933%26mt%3D1659354538%26fvip%3D5%26keepalive%3Dyes%26fexp%3D24001373%252C24007246%26c%3DWEB%26rbqsm%3Dfr%26txp%3D4532434%26n%3Dd2g6G2hVqWIXxedQ%26sparams%3Dexpire%252Cei%252Cip%252Cid%252Citag%252Csource%252Crequiressl%252Cspc%252Cvprv%252Cmime%252Cns%252Cgir%252Cclen%252Cdur%252Clmt%26lsparams%3Dmh%252Cmm%252Cmn%252Cms%252Cmv%252Cmvi%252Cpl%252Cinitcwndbps%26lsig%3DAG3C_xAwRQIgCKCGJ1iu4wlaGXy3jcJyU3inh9dr1FIfqYOZEG_MdmACIQCbungkQYFk7EhD6K2YvLaHFMjKOFWjw001_tLb0lPDtg%253D%253D"; let signature_cipher = "s=w%3DAe%3DA6aDNQLkViKS7LOm9QtxZJHKwb53riq9qEFw-ecBWJCAiA%3DcEg0tn3dty9jEHszfzh4Ud__bg9CEHVx4ix-7dKsIPAhIQRw8JQ0qOA&sp=sig&url=https://rr5---sn-h0jelnez.googlevideo.com/videoplayback%3Fexpire%3D1659376413%26ei%3Dvb7nYvH5BMK8gAfBj7ToBQ%26ip%3D2003%253Ade%253Aaf06%253A6300%253Ac750%253A1b77%253Ac74a%253A80e3%26id%3Do-AB_BABwrXZJN428ZwDxq5ScPn2AbcGODnRlTVhCQ3mj2%26itag%3D251%26source%3Dyoutube%26requiressl%3Dyes%26mh%3DhH%26mm%3D31%252C26%26mn%3Dsn-h0jelnez%252Csn-4g5ednsl%26ms%3Dau%252Conr%26mv%3Dm%26mvi%3D5%26pl%3D37%26initcwndbps%3D1588750%26spc%3DlT-Khi831z8dTejFIRCvCEwx_6romtM%26vprv%3D1%26mime%3Daudio%252Fwebm%26ns%3Db_Mq_qlTFcSGlG9RpwpM9xQH%26gir%3Dyes%26clen%3D3781277%26dur%3D229.301%26lmt%3D1655510291473933%26mt%3D1659354538%26fvip%3D5%26keepalive%3Dyes%26fexp%3D24001373%252C24007246%26c%3DWEB%26rbqsm%3Dfr%26txp%3D4532434%26n%3Dd2g6G2hVqWIXxedQ%26sparams%3Dexpire%252Cei%252Cip%252Cid%252Citag%252Csource%252Crequiressl%252Cspc%252Cvprv%252Cmime%252Cns%252Cgir%252Cclen%252Cdur%252Clmt%26lsparams%3Dmh%252Cmm%252Cmn%252Cms%252Cmv%252Cmvi%252Cpl%252Cinitcwndbps%26lsig%3DAG3C_xAwRQIgCKCGJ1iu4wlaGXy3jcJyU3inh9dr1FIfqYOZEG_MdmACIQCbungkQYFk7EhD6K2YvLaHFMjKOFWjw001_tLb0lPDtg%253D%253D";

View file

@ -105,6 +105,8 @@ pub struct GridVideoRenderer {
/// Contains video length /// Contains video length
#[serde_as(as = "VecSkipError<_>")] #[serde_as(as = "VecSkipError<_>")]
pub thumbnail_overlays: Vec<TimeOverlay>, pub thumbnail_overlays: Vec<TimeOverlay>,
/// Release date for upcoming videos
pub upcoming_event_data: Option<UpcomingEventData>,
} }
/// Video displayed in recommendations /// Video displayed in recommendations
@ -166,6 +168,15 @@ pub struct GridPlaylistRenderer {
pub video_count_short_text: String, pub video_count_short_text: String,
} }
#[serde_as]
#[derive(Clone, Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UpcomingEventData {
/// Unixtime in seconds
#[serde_as(as = "JsonString")]
pub start_time: i64,
}
#[derive(Clone, Debug, Deserialize)] #[derive(Clone, Debug, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct ContinuationItemRenderer { pub struct ContinuationItemRenderer {

View file

@ -175,6 +175,7 @@ Channel(
view_count: Some(19739), view_count: Some(19739),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "WHO8NBfpaO0", id: "WHO8NBfpaO0",
@ -207,6 +208,7 @@ Channel(
view_count: Some(24194), view_count: Some(24194),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "W1Q8CxL95_Y", id: "W1Q8CxL95_Y",
@ -239,6 +241,7 @@ Channel(
view_count: Some(51443), view_count: Some(51443),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "lagxSrPeoYg", id: "lagxSrPeoYg",
@ -271,6 +274,7 @@ Channel(
view_count: Some(72324), view_count: Some(72324),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "qTctWW9_FmE", id: "qTctWW9_FmE",
@ -303,6 +307,7 @@ Channel(
view_count: Some(57348), view_count: Some(57348),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "3t9G80wk0pk", id: "3t9G80wk0pk",
@ -335,6 +340,7 @@ Channel(
view_count: Some(68645), view_count: Some(68645),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "7dze5CnZnmk", id: "7dze5CnZnmk",
@ -367,6 +373,7 @@ Channel(
view_count: Some(91388), view_count: Some(91388),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "6XnrZpPYgBg", id: "6XnrZpPYgBg",
@ -399,6 +406,7 @@ Channel(
view_count: Some(39993), view_count: Some(39993),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "Psp3ltpFvws", id: "Psp3ltpFvws",
@ -431,6 +439,7 @@ Channel(
view_count: Some(22512), view_count: Some(22512),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "taVYTYz5vLE", id: "taVYTYz5vLE",
@ -463,6 +472,7 @@ Channel(
view_count: Some(40137), view_count: Some(40137),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "Y6cZrieFw-k", id: "Y6cZrieFw-k",
@ -495,6 +505,7 @@ Channel(
view_count: Some(74510), view_count: Some(74510),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "Kr2XyhpUdUI", id: "Kr2XyhpUdUI",
@ -527,6 +538,7 @@ Channel(
view_count: Some(34487), view_count: Some(34487),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "rxGafdgkal8", id: "rxGafdgkal8",
@ -559,6 +571,7 @@ Channel(
view_count: Some(44928), view_count: Some(44928),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "4yosozyeIP4", id: "4yosozyeIP4",
@ -591,6 +604,7 @@ Channel(
view_count: Some(34324), view_count: Some(34324),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "06JtC2DC_dQ", id: "06JtC2DC_dQ",
@ -623,6 +637,7 @@ Channel(
view_count: Some(63763), view_count: Some(63763),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "piquT76w9TI", id: "piquT76w9TI",
@ -655,6 +670,7 @@ Channel(
view_count: Some(149186), view_count: Some(149186),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "pKuUKT-zU-g", id: "pKuUKT-zU-g",
@ -687,6 +703,7 @@ Channel(
view_count: Some(30130), view_count: Some(30130),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "_R4wQQNSO6k", id: "_R4wQQNSO6k",
@ -719,6 +736,7 @@ Channel(
view_count: Some(48037), view_count: Some(48037),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "ikp5BorIo_M", id: "ikp5BorIo_M",
@ -751,6 +769,7 @@ Channel(
view_count: Some(81958), view_count: Some(81958),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "7O-QckjCXNo", id: "7O-QckjCXNo",
@ -783,6 +802,7 @@ Channel(
view_count: Some(42635), view_count: Some(42635),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "VutdTxF4E-0", id: "VutdTxF4E-0",
@ -815,6 +835,7 @@ Channel(
view_count: Some(25860), view_count: Some(25860),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "o7xfGuRaq94", id: "o7xfGuRaq94",
@ -847,6 +868,7 @@ Channel(
view_count: Some(63035), view_count: Some(63035),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "3WSIfHOv3fc", id: "3WSIfHOv3fc",
@ -879,6 +901,7 @@ Channel(
view_count: Some(22731), view_count: Some(22731),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "8yXZJZCKImI", id: "8yXZJZCKImI",
@ -911,6 +934,7 @@ Channel(
view_count: Some(65765), view_count: Some(65765),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "vJ4pW6LKJWU", id: "vJ4pW6LKJWU",
@ -943,6 +967,7 @@ Channel(
view_count: Some(51555), view_count: Some(51555),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "myqiqUE00fo", id: "myqiqUE00fo",
@ -975,6 +1000,7 @@ Channel(
view_count: Some(46638), view_count: Some(46638),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "xIokNnjuam8", id: "xIokNnjuam8",
@ -1007,6 +1033,7 @@ Channel(
view_count: Some(62921), view_count: Some(62921),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "S3R4r2xvVYQ", id: "S3R4r2xvVYQ",
@ -1039,6 +1066,7 @@ Channel(
view_count: Some(66895), view_count: Some(66895),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "RlwcdUnRw6w", id: "RlwcdUnRw6w",
@ -1071,6 +1099,7 @@ Channel(
view_count: Some(25894), view_count: Some(25894),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "R2fw2g6WFbg", id: "R2fw2g6WFbg",
@ -1103,6 +1132,7 @@ Channel(
view_count: Some(80173), view_count: Some(80173),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
], ],
ctoken: Some("4qmFsgKrARIYVUMyRGpGRTdYZjExVVJacVdCaWdjVk9RGmBFZ1oyYVdSbGIzTVlBeUFBTUFFNEFlb0RNRVZuYjBsMVMzWlpPVXREWWw5TVRraExSRWwzUVZSblpWRm5kMGx3ZFVOMGJWRlpVVjlOUjA1d2QwcEpRVlpCUVElM0QlM0SaAixicm93c2UtZmVlZFVDMkRqRkU3WGYxMVVSWnFXQmlnY1ZPUXZpZGVvczEwMg%3D%3D"), ctoken: Some("4qmFsgKrARIYVUMyRGpGRTdYZjExVVJacVdCaWdjVk9RGmBFZ1oyYVdSbGIzTVlBeUFBTUFFNEFlb0RNRVZuYjBsMVMzWlpPVXREWWw5TVRraExSRWwzUVZSblpWRm5kMGx3ZFVOMGJWRlpVVjlOUjA1d2QwcEpRVlpCUVElM0QlM0SaAixicm93c2UtZmVlZFVDMkRqRkU3WGYxMVVSWnFXQmlnY1ZPUXZpZGVvczEwMg%3D%3D"),

View file

@ -36,6 +36,7 @@ Paginator(
view_count: Some(80296), view_count: Some(80296),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "JDXKrXJloSw", id: "JDXKrXJloSw",
@ -68,6 +69,7 @@ Paginator(
view_count: Some(36294), view_count: Some(36294),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "H8ot_YPi6QU", id: "H8ot_YPi6QU",
@ -100,6 +102,7 @@ Paginator(
view_count: Some(34736), view_count: Some(34736),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "i1Ad5jfk_v4", id: "i1Ad5jfk_v4",
@ -132,6 +135,7 @@ Paginator(
view_count: Some(73544), view_count: Some(73544),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "GHbo4v8pahc", id: "GHbo4v8pahc",
@ -164,6 +168,7 @@ Paginator(
view_count: Some(67231), view_count: Some(67231),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "Uds-wLoaZmA", id: "Uds-wLoaZmA",
@ -196,6 +201,7 @@ Paginator(
view_count: Some(44946), view_count: Some(44946),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "D9J-AmCcf4U", id: "D9J-AmCcf4U",
@ -228,6 +234,7 @@ Paginator(
view_count: Some(43264), view_count: Some(43264),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "Eoh-JKVQZwg", id: "Eoh-JKVQZwg",
@ -260,6 +267,7 @@ Paginator(
view_count: Some(98175), view_count: Some(98175),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "U81glZBDpIg", id: "U81glZBDpIg",
@ -292,6 +300,7 @@ Paginator(
view_count: Some(59376), view_count: Some(59376),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "gLfxznVJ2q0", id: "gLfxznVJ2q0",
@ -324,6 +333,7 @@ Paginator(
view_count: Some(25496), view_count: Some(25496),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "GfihUkWPCQQ", id: "GfihUkWPCQQ",
@ -356,6 +366,7 @@ Paginator(
view_count: Some(22982), view_count: Some(22982),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "yEG6pKUdIlg", id: "yEG6pKUdIlg",
@ -388,6 +399,7 @@ Paginator(
view_count: Some(38804), view_count: Some(38804),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "wPzzPGzxD00", id: "wPzzPGzxD00",
@ -420,6 +432,7 @@ Paginator(
view_count: Some(25505), view_count: Some(25505),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "Tdge8vEODeY", id: "Tdge8vEODeY",
@ -452,6 +465,7 @@ Paginator(
view_count: Some(98432), view_count: Some(98432),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "ebQ2Im5zfT0", id: "ebQ2Im5zfT0",
@ -484,6 +498,7 @@ Paginator(
view_count: Some(53410), view_count: Some(53410),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "UrS5ezesA9s", id: "UrS5ezesA9s",
@ -516,6 +531,7 @@ Paginator(
view_count: Some(54771), view_count: Some(54771),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "c5M8P6oe9xY", id: "c5M8P6oe9xY",
@ -548,6 +564,7 @@ Paginator(
view_count: Some(39823), view_count: Some(39823),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "9TDKP9RLlPs", id: "9TDKP9RLlPs",
@ -580,6 +597,7 @@ Paginator(
view_count: Some(51596), view_count: Some(51596),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "hwggIw2HQuQ", id: "hwggIw2HQuQ",
@ -612,6 +630,7 @@ Paginator(
view_count: Some(125391), view_count: Some(125391),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "xzSDJRC0F6c", id: "xzSDJRC0F6c",
@ -644,6 +663,7 @@ Paginator(
view_count: Some(120457), view_count: Some(120457),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "9wuyPZjjR9k", id: "9wuyPZjjR9k",
@ -676,6 +696,7 @@ Paginator(
view_count: Some(49062), view_count: Some(49062),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "vyJuMGEFbjQ", id: "vyJuMGEFbjQ",
@ -708,6 +729,7 @@ Paginator(
view_count: Some(49032), view_count: Some(49032),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "_pETMto-9iE", id: "_pETMto-9iE",
@ -740,6 +762,7 @@ Paginator(
view_count: Some(64108), view_count: Some(64108),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "MvFf9RSJUhk", id: "MvFf9RSJUhk",
@ -772,6 +795,7 @@ Paginator(
view_count: Some(76831), view_count: Some(76831),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "E6obq3T71vI", id: "E6obq3T71vI",
@ -804,6 +828,7 @@ Paginator(
view_count: Some(49961), view_count: Some(49961),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "ZTwVQmUm6NY", id: "ZTwVQmUm6NY",
@ -836,6 +861,7 @@ Paginator(
view_count: Some(17393), view_count: Some(17393),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "prQinQ4MWmU", id: "prQinQ4MWmU",
@ -868,6 +894,7 @@ Paginator(
view_count: Some(38281), view_count: Some(38281),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "yMIzsFAztv4", id: "yMIzsFAztv4",
@ -900,6 +927,7 @@ Paginator(
view_count: Some(70004), view_count: Some(70004),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "QtqljdMwRyk", id: "QtqljdMwRyk",
@ -932,6 +960,7 @@ Paginator(
view_count: Some(93700), view_count: Some(93700),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "kcWwAweWjQg", id: "kcWwAweWjQg",
@ -964,6 +993,7 @@ Paginator(
view_count: Some(37515), view_count: Some(37515),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
], ],
ctoken: Some("4qmFsgKxARIYVUMyRGpGRTdYZjExVVJacVdCaWdjVk9RGmZFZ1oyYVdSbGIzTVlBeUFBTUFFNEFlb0ROME5uVGtSU1JXdFRRM2RwU1cxMGNUaHpTVVJ6TkhCRlFrdEVTWGRCYW1jNFVXZHpTUzFRUkVodFVWbFJhVzloY0VWclowTlZSRWslM0SaAixicm93c2UtZmVlZFVDMkRqRkU3WGYxMVVSWnFXQmlnY1ZPUXZpZGVvczEwMg%3D%3D"), ctoken: Some("4qmFsgKxARIYVUMyRGpGRTdYZjExVVJacVdCaWdjVk9RGmZFZ1oyYVdSbGIzTVlBeUFBTUFFNEFlb0ROME5uVGtSU1JXdFRRM2RwU1cxMGNUaHpTVVJ6TkhCRlFrdEVTWGRCYW1jNFVXZHpTUzFRUkVodFVWbFJhVzloY0VWclowTlZSRWslM0SaAixicm93c2UtZmVlZFVDMkRqRkU3WGYxMVVSWnFXQmlnY1ZPUXZpZGVvczEwMg%3D%3D"),

View file

@ -159,6 +159,7 @@ Channel(
view_count: Some(94), view_count: Some(94),
is_live: true, is_live: true,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "19hKXI1ENrY", id: "19hKXI1ENrY",
@ -191,6 +192,7 @@ Channel(
view_count: Some(381), view_count: Some(381),
is_live: true, is_live: true,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "CqMUC5eXX7c", id: "CqMUC5eXX7c",
@ -223,6 +225,7 @@ Channel(
view_count: Some(241528), view_count: Some(241528),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "A77SYlXKQEM", id: "A77SYlXKQEM",
@ -255,6 +258,7 @@ Channel(
view_count: Some(118351), view_count: Some(118351),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "72vkRHQfjbk", id: "72vkRHQfjbk",
@ -287,6 +291,7 @@ Channel(
view_count: Some(157971), view_count: Some(157971),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "AMWMDhibROw", id: "AMWMDhibROw",
@ -319,6 +324,7 @@ Channel(
view_count: Some(82309), view_count: Some(82309),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "9UMxZofMNbA", id: "9UMxZofMNbA",
@ -351,6 +357,7 @@ Channel(
view_count: Some(2043), view_count: Some(2043),
is_live: true, is_live: true,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "a2sEYVwBvX4", id: "a2sEYVwBvX4",
@ -383,6 +390,7 @@ Channel(
view_count: Some(186475), view_count: Some(186475),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "JAY-prtJnGY", id: "JAY-prtJnGY",
@ -415,6 +423,7 @@ Channel(
view_count: Some(66425), view_count: Some(66425),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "DySa8OrQDi4", id: "DySa8OrQDi4",
@ -447,6 +456,7 @@ Channel(
view_count: Some(1520020), view_count: Some(1520020),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "NqzXULaB8MA", id: "NqzXULaB8MA",
@ -479,6 +489,7 @@ Channel(
view_count: Some(37549), view_count: Some(37549),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "UGzy6uhZkmw", id: "UGzy6uhZkmw",
@ -511,6 +522,7 @@ Channel(
view_count: Some(33002), view_count: Some(33002),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "iuvapHKpW8A", id: "iuvapHKpW8A",
@ -543,6 +555,7 @@ Channel(
view_count: Some(42036), view_count: Some(42036),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "n_1Nwht-Gh4", id: "n_1Nwht-Gh4",
@ -575,6 +588,7 @@ Channel(
view_count: Some(322935), view_count: Some(322935),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "6TptI5BtP5U", id: "6TptI5BtP5U",
@ -607,6 +621,7 @@ Channel(
view_count: Some(91980), view_count: Some(91980),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "36YnV9STBqc", id: "36YnV9STBqc",
@ -639,6 +654,7 @@ Channel(
view_count: Some(4030), view_count: Some(4030),
is_live: true, is_live: true,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "7x6ii2TcsPE", id: "7x6ii2TcsPE",
@ -671,6 +687,7 @@ Channel(
view_count: Some(288098), view_count: Some(288098),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "mxV5MBZYYDE", id: "mxV5MBZYYDE",
@ -703,6 +720,7 @@ Channel(
view_count: Some(50818), view_count: Some(50818),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "hh2AOoPoAIo", id: "hh2AOoPoAIo",
@ -735,6 +753,7 @@ Channel(
view_count: Some(98431), view_count: Some(98431),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "aFlvhtWsJ0g", id: "aFlvhtWsJ0g",
@ -767,6 +786,7 @@ Channel(
view_count: Some(572456), view_count: Some(572456),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "cD-d7u6fnEI", id: "cD-d7u6fnEI",
@ -799,6 +819,7 @@ Channel(
view_count: Some(3114909), view_count: Some(3114909),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
], ],
ctoken: None, ctoken: None,

View file

@ -131,6 +131,7 @@ Channel(
view_count: Some(443549), view_count: Some(443549),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "SRrvxFc2b2c", id: "SRrvxFc2b2c",
@ -148,6 +149,7 @@ Channel(
view_count: Some(1154962), view_count: Some(1154962),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "l9TiwunjzgA", id: "l9TiwunjzgA",
@ -180,6 +182,7 @@ Channel(
view_count: Some(477460), view_count: Some(477460),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "cNx0ql9gnf4", id: "cNx0ql9gnf4",
@ -197,6 +200,7 @@ Channel(
view_count: Some(1388173), view_count: Some(1388173),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "fGQUWI4o__A", id: "fGQUWI4o__A",
@ -214,6 +218,7 @@ Channel(
view_count: Some(1738301), view_count: Some(1738301),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "Q73VTjdqVA8", id: "Q73VTjdqVA8",
@ -231,6 +236,7 @@ Channel(
view_count: Some(1316594), view_count: Some(1316594),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "pRVSdUxdsVw", id: "pRVSdUxdsVw",
@ -263,6 +269,7 @@ Channel(
view_count: Some(478703), view_count: Some(478703),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "gTG2WDbiYGo", id: "gTG2WDbiYGo",
@ -280,6 +287,7 @@ Channel(
view_count: Some(1412213), view_count: Some(1412213),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "y5JK5YFp92g", id: "y5JK5YFp92g",
@ -297,6 +305,7 @@ Channel(
view_count: Some(1513305), view_count: Some(1513305),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "pvSWHm4wlxY", id: "pvSWHm4wlxY",
@ -314,6 +323,7 @@ Channel(
view_count: Some(8936223), view_count: Some(8936223),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "2FJVhdOO0F0", id: "2FJVhdOO0F0",
@ -346,6 +356,7 @@ Channel(
view_count: Some(987083), view_count: Some(987083),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "CqFGACRrWJE", id: "CqFGACRrWJE",
@ -363,6 +374,7 @@ Channel(
view_count: Some(2769717), view_count: Some(2769717),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "CutR_1SDDzY", id: "CutR_1SDDzY",
@ -395,6 +407,7 @@ Channel(
view_count: Some(497660), view_count: Some(497660),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "DdGr6t2NqKc", id: "DdGr6t2NqKc",
@ -412,6 +425,7 @@ Channel(
view_count: Some(572107), view_count: Some(572107),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "jKS44NMWuXw", id: "jKS44NMWuXw",
@ -429,6 +443,7 @@ Channel(
view_count: Some(1707132), view_count: Some(1707132),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "kx1YtJM_vbI", id: "kx1YtJM_vbI",
@ -446,6 +461,7 @@ Channel(
view_count: Some(933094), view_count: Some(933094),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "Sdbzs-1WWH0", id: "Sdbzs-1WWH0",
@ -463,6 +479,7 @@ Channel(
view_count: Some(5985184), view_count: Some(5985184),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "9qBHyJIDous", id: "9qBHyJIDous",
@ -480,6 +497,7 @@ Channel(
view_count: Some(14741387), view_count: Some(14741387),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "mBeFDb4gp8s", id: "mBeFDb4gp8s",
@ -497,6 +515,7 @@ Channel(
view_count: Some(2511322), view_count: Some(2511322),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "b38r1UYqoBQ", id: "b38r1UYqoBQ",
@ -514,6 +533,7 @@ Channel(
view_count: Some(2364408), view_count: Some(2364408),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "KUz7oArksR4", id: "KUz7oArksR4",
@ -546,6 +566,7 @@ Channel(
view_count: Some(706059), view_count: Some(706059),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "RdFk4WaifEo", id: "RdFk4WaifEo",
@ -563,6 +584,7 @@ Channel(
view_count: Some(1947627), view_count: Some(1947627),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "GuyGyzZcumI", id: "GuyGyzZcumI",
@ -580,6 +602,7 @@ Channel(
view_count: Some(4763839), view_count: Some(4763839),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "07Zipsb3-qU", id: "07Zipsb3-qU",
@ -597,6 +620,7 @@ Channel(
view_count: Some(1915695), view_count: Some(1915695),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "3kaePnU6Clo", id: "3kaePnU6Clo",
@ -614,6 +638,7 @@ Channel(
view_count: Some(7268944), view_count: Some(7268944),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "rt4rXMftnpg", id: "rt4rXMftnpg",
@ -631,6 +656,7 @@ Channel(
view_count: Some(2539103), view_count: Some(2539103),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "DTyLUvbf128", id: "DTyLUvbf128",
@ -648,6 +674,7 @@ Channel(
view_count: Some(5545680), view_count: Some(5545680),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "DzjLBgIe_aI", id: "DzjLBgIe_aI",
@ -665,6 +692,7 @@ Channel(
view_count: Some(2202314), view_count: Some(2202314),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "sPb2gyN-hnE", id: "sPb2gyN-hnE",
@ -697,6 +725,7 @@ Channel(
view_count: Some(613416), view_count: Some(613416),
is_live: false, is_live: false,
is_short: false, is_short: false,
is_upcoming: false,
), ),
ChannelVideo( ChannelVideo(
id: "9JboRKeJ2m4", id: "9JboRKeJ2m4",
@ -714,6 +743,7 @@ Channel(
view_count: Some(6443699), view_count: Some(6443699),
is_live: false, is_live: false,
is_short: true, is_short: true,
is_upcoming: false,
), ),
], ],
ctoken: Some("4qmFsgKrARIYVUNoOGdIZHR6TzJ0WGQ1OTNfYmpFcldnGmBFZ1oyYVdSbGIzTVlBeUFBTUFFNEFlb0RNRVZuYzBrM2NsTnVkazF4U1hWemRqQkJVMmQ1VFVGRk5FaHJTVXhEVUhac2NscHJSMFZKWVhWd016RkpRVlpCUVElM0QlM0SaAixicm93c2UtZmVlZFVDaDhnSGR0ek8ydFhkNTkzX2JqRXJXZ3ZpZGVvczEwMg%3D%3D"), ctoken: Some("4qmFsgKrARIYVUNoOGdIZHR6TzJ0WGQ1OTNfYmpFcldnGmBFZ1oyYVdSbGIzTVlBeUFBTUFFNEFlb0RNRVZuYzBrM2NsTnVkazF4U1hWemRqQkJVMmQ1VFVGRk5FaHJTVXhEVUhac2NscHJSMFZKWVhWd016RkpRVlpCUVElM0QlM0SaAixicm93c2UtZmVlZFVDaDhnSGR0ek8ydFhkNTkzX2JqRXJXZ3ZpZGVvczEwMg%3D%3D"),

View file

@ -1,8 +1,12 @@
// This file is automatically generated. DO NOT EDIT. // This file is automatically generated. DO NOT EDIT.
//! Languages and countries
use std::{fmt::Display, str::FromStr}; use std::{fmt::Display, str::FromStr};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
/// Available languages
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[serde(rename_all = "lowercase")] #[serde(rename_all = "lowercase")]
pub enum Language { pub enum Language {
@ -184,6 +188,7 @@ pub enum Language {
Zu, Zu,
} }
/// Available countries
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[serde(rename_all = "UPPERCASE")] #[serde(rename_all = "UPPERCASE")]
pub enum Country { pub enum Country {
@ -407,6 +412,7 @@ pub enum Country {
Zw, Zw,
} }
/// Array of all available languages
pub const LANGUAGES: [Language; 83] = [ pub const LANGUAGES: [Language; 83] = [
Language::Af, Language::Af,
Language::Am, Language::Am,
@ -493,6 +499,7 @@ pub const LANGUAGES: [Language; 83] = [
Language::Zu, Language::Zu,
]; ];
/// Array of all available countries
pub const COUNTRIES: [Country; 109] = [ pub const COUNTRIES: [Country; 109] = [
Country::Ae, Country::Ae,
Country::Ar, Country::Ar,
@ -606,6 +613,9 @@ pub const COUNTRIES: [Country; 109] = [
]; ];
impl Language { impl Language {
/// Get the native name of the language
///
/// Examples: "English (US)", "Deutsch", "中文 (简体)"
pub fn name(&self) -> &str { pub fn name(&self) -> &str {
match self { match self {
Language::Af => "Afrikaans", Language::Af => "Afrikaans",
@ -696,6 +706,9 @@ impl Language {
} }
impl Country { impl Country {
/// Get the English name of the country
///
/// Examples: "United States", "Germany"
pub fn name(&self) -> &str { pub fn name(&self) -> &str {
match self { match self {
Country::Ae => "United Arab Emirates", Country::Ae => "United Arab Emirates",

View file

@ -465,9 +465,9 @@ pub struct VideoDetails {
/// ///
/// Information about the license: /// Information about the license:
/// ///
/// https://www.youtube.com/t/creative_commons /// <https://www.youtube.com/t/creative_commons>
/// ///
/// https://creativecommons.org/licenses/by/3.0/ /// <https://creativecommons.org/licenses/by/3.0/>
pub is_ccommons: bool, pub is_ccommons: bool,
/// Chapters of the video /// Chapters of the video
pub chapters: Vec<Chapter>, pub chapters: Vec<Chapter>,
@ -670,12 +670,13 @@ pub struct ChannelVideo {
/// Video publishing date. /// Video publishing date.
/// ///
/// `None` if the date could not be parsed. /// `None` if the date could not be parsed.
/// May be in the future for upcoming videos
pub publish_date: Option<DateTime<Local>>, pub publish_date: Option<DateTime<Local>>,
/// Textual video publish date (e.g. `11 months ago`, depends on language) /// Textual video publish date (e.g. `11 months ago`, depends on language)
/// ///
/// Is `None` for livestreams. /// Is `None` for livestreams and upcoming videos.
pub publish_date_txt: Option<String>, pub publish_date_txt: Option<String>,
/// View count /// Number of views / current viewers in case of a livestream.
/// ///
/// `None` if it could not be extracted. /// `None` if it could not be extracted.
pub view_count: Option<u64>, pub view_count: Option<u64>,
@ -683,6 +684,8 @@ pub struct ChannelVideo {
pub is_live: bool, pub is_live: bool,
/// Is the video a YouTube Short video (vertical and <60s)? /// Is the video a YouTube Short video (vertical and <60s)?
pub is_short: bool, pub is_short: bool,
/// Is the video announced, but not released yet (YouTube Premiere)?
pub is_upcoming: bool,
} }
/// Playlist fetched from a YouTube channel /// Playlist fetched from a YouTube channel
@ -741,7 +744,7 @@ pub struct ChannelRssVideo {
pub publish_date: DateTime<Utc>, pub publish_date: DateTime<Utc>,
/// Date and time when the RSS feed entry was last updated. /// Date and time when the RSS feed entry was last updated.
pub update_date: DateTime<Utc>, pub update_date: DateTime<Utc>,
/// View count /// Number of views / current viewers in case of a livestream.
pub view_count: u64, pub view_count: u64,
/// Number of likes /// Number of likes
/// ///

View file

@ -1,3 +1,5 @@
//! Data model for texts with links
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] #[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
@ -41,6 +43,7 @@ pub trait ToPlaintext {
/// Trait for converting rich text to html. /// Trait for converting rich text to html.
#[cfg(feature = "html")] #[cfg(feature = "html")]
#[cfg_attr(docsrs, doc(cfg(feature = "html")))]
pub trait ToHtml { pub trait ToHtml {
/// Convert rich text to html. /// Convert rich text to html.
fn to_html(&self) -> String { fn to_html(&self) -> String {
@ -93,6 +96,7 @@ impl ToPlaintext for TextComponent {
} }
#[cfg(feature = "html")] #[cfg(feature = "html")]
#[cfg_attr(docsrs, doc(cfg(feature = "html")))]
impl ToHtml for TextComponent { impl ToHtml for TextComponent {
fn to_html_yt_host(&self, yt_host: &str) -> String { fn to_html_yt_host(&self, yt_host: &str) -> String {
match self { match self {
@ -127,6 +131,7 @@ impl ToPlaintext for RichText {
} }
#[cfg(feature = "html")] #[cfg(feature = "html")]
#[cfg_attr(docsrs, doc(cfg(feature = "html")))]
impl ToHtml for RichText { impl ToHtml for RichText {
fn to_html_yt_host(&self, yt_host: &str) -> String { fn to_html_yt_host(&self, yt_host: &str) -> String {
self.0.iter().map(|c| c.to_html_yt_host(yt_host)).collect() self.0.iter().map(|c| c.to_html_yt_host(yt_host)).collect()

View file

@ -1,3 +1,5 @@
//! Filters for selecting audio/video streams
use std::collections::HashSet; use std::collections::HashSet;
use super::{ use super::{

File diff suppressed because it is too large Load diff