Compare commits

...

2 commits

Author SHA1 Message Date
edb5ab0abb
chore: update base64 to v0.22
All checks were successful
CI / Test (push) Successful in 2m40s
2024-03-16 19:23:11 +01:00
eecabffd18
tests: remove tokio_test::block_on 2024-03-16 19:21:30 +01:00
4 changed files with 511 additions and 335 deletions

View file

@ -58,7 +58,7 @@ time = { version = "0.3.15", features = [
futures = "0.3.21"
ress = "0.11.4"
phf = "0.11.1"
base64 = "0.21.0"
base64 = "0.22.0"
urlencoding = "2.1.2"
quick-xml = { version = "0.31.0", features = ["serialize"], optional = true }
tracing = { version = "0.1.37", features = ["log"] }

View file

@ -1602,24 +1602,24 @@ mod tests {
parts[0].parse().unwrap()
}
#[test]
fn t_extract_desktop_client_version() {
#[tokio::test]
async fn t_extract_desktop_client_version() {
let rp = RustyPipe::new();
let version = tokio_test::block_on(rp.extract_desktop_client_version()).unwrap();
let version = rp.extract_desktop_client_version().await.unwrap();
assert!(get_major_version(&version) >= 2);
}
#[test]
fn t_extract_music_client_version() {
#[tokio::test]
async fn t_extract_music_client_version() {
let rp = RustyPipe::new();
let version = tokio_test::block_on(rp.extract_music_client_version()).unwrap();
let version = rp.extract_music_client_version().await.unwrap();
assert!(get_major_version(&version) >= 1);
}
#[test]
fn t_get_visitor_data() {
#[tokio::test]
async fn t_get_visitor_data() {
let rp = RustyPipe::new();
let visitor_data = tokio_test::block_on(rp.get_visitor_data()).unwrap();
let visitor_data = rp.get_visitor_data().await.unwrap();
assert!(
visitor_data.starts_with("Cg") && visitor_data.len() > 23,

View file

@ -426,18 +426,18 @@ c[36](c[8],c[32]),c[20](c[25],c[10]),c[2](c[22],c[8]),c[32](c[20],c[16]),c[32](c
assert_eq!(res, "nrkec0fwgTWolw");
}
#[test]
fn t_get_player_js_url() {
#[tokio::test]
async fn t_get_player_js_url() {
let client = Client::new();
let url = tokio_test::block_on(get_player_js_url(&client)).unwrap();
let url = get_player_js_url(&client).await.unwrap();
assert!(url.starts_with("https://www.youtube.com/s/player"));
assert_eq!(url.len(), 73);
}
#[test]
fn t_update() {
#[tokio::test]
async fn t_update() {
let client = Client::new();
let deobf_data = tokio_test::block_on(DeobfData::extract(client, None)).unwrap();
let deobf_data = DeobfData::extract(client, None).await.unwrap();
let deobf = Deobfuscator::new(&deobf_data).unwrap();
let deobf_sig = deobf.deobfuscate_sig("GOqGOqGOq0QJ8wRAIgaryQHfplJ9xJSKFywyaSMHuuwZYsoMTAvRvfm51qIGECIA5061zWeyfMPX9hEl_U6f9J0tr7GTJMKyPf5XNrJb5fb5i").unwrap();

File diff suppressed because it is too large Load diff