From 9ca056751dde6acbb2463e8de4b50c65083a6aca Mon Sep 17 00:00:00 2001 From: Mithronn Date: Sat, 27 Jul 2024 20:45:59 +0300 Subject: [PATCH] 27.07.2024 * Added age restricted videos support --- Cargo.toml | 22 ++++---- src/blocking/search/youtube.rs | 2 + src/info.rs | 93 ++++++++++++++++++++++++++++++---- src/structs.rs | 6 +++ src/utils.rs | 66 ++++++++++++++++++++++-- 5 files changed, 165 insertions(+), 24 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6f6d43c..7fa8870 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,34 +26,34 @@ reqwest = { version = "0.12.5", features = [ "cookies", "gzip", ], default-features = false } -scraper = "0.19.0" -serde = "1.0.202" -serde_json = "1.0.117" +scraper = "0.19.1" +serde = "1.0.204" +serde_json = "1.0.120" serde_qs = "0.13.0" -regex = "1.10.3" -url = "2.5.0" +regex = "1.10.5" +url = "2.5.2" urlencoding = "2.1.3" -thiserror = "1.0.60" -derive_more = "0.99.17" +thiserror = "1.0.63" +derive_more = "0.99.18" derivative = "2.2.0" once_cell = "1.19.0" -tokio = { version = "1.37.0", default-features = false, features = ["sync"] } +tokio = { version = "1.39.2", default-features = false, features = ["sync"] } rand = "0.8.5" reqwest-middleware = { version = "0.3.2", features = ["json"] } reqwest-retry = "0.6.0" m3u8-rs = "6.0.0" -async-trait = "0.1.80" +async-trait = "0.1.81" aes = "0.8.4" cbc = { version = "0.1.2", features = ["std"] } hex = "0.4.3" boa_engine = "0.17.3" mime = "0.3.17" -bytes = "1.6.0" +bytes = "1.6.1" flame = { version = "0.2.2", optional = true } flamer = { version = "0.5.0", optional = true } [dev-dependencies] -tokio = { version = "1.37.0", features = ["full"] } +tokio = { version = "1.39.2", features = ["full"] } [features] default = ["search", "live", "default-tls"] diff --git a/src/blocking/search/youtube.rs b/src/blocking/search/youtube.rs index 0a4a2ab..9edffa7 100644 --- a/src/blocking/search/youtube.rs +++ b/src/blocking/search/youtube.rs @@ -98,6 +98,7 @@ impl Playlist { /// Get next chunk of videos from playlist and return fetched [`Video`] array. /// - If limit is [`None`] it will be [`u64::MAX`] /// - If [`Playlist`] is coming from [`SearchResult`] this function always return empty [`Vec