fixes and cleanup

This commit is contained in:
Simon
2026-03-05 18:18:48 +00:00
parent 76fd5a4f4f
commit 2627505ade
49 changed files with 3245 additions and 1376 deletions

View File

@@ -1,4 +1,4 @@
use base64::{engine::general_purpose, Engine as _};
use base64::{Engine as _, engine::general_purpose};
use ntex::web;
use crate::util::requester::Requester;
@@ -24,13 +24,11 @@ fn boo(sum1: u32, sum2: u32) -> String {
}
#[derive(Debug, Clone)]
pub struct SxyprnProxy {
}
pub struct SxyprnProxy {}
impl SxyprnProxy {
pub fn new() -> Self {
SxyprnProxy {
}
SxyprnProxy {}
}
pub async fn get_video_url(
@@ -45,16 +43,23 @@ impl SxyprnProxy {
return "".to_string();
}
let data_string = text.split("data-vnfo='").collect::<Vec<&str>>()[1]
.split("\":\"").collect::<Vec<&str>>()[1]
.split("\"}").collect::<Vec<&str>>()[0].replace("\\","");
.split("\":\"")
.collect::<Vec<&str>>()[1]
.split("\"}")
.collect::<Vec<&str>>()[0]
.replace("\\", "");
//println!("src: {}",data_string);
let mut tmp = data_string
.split("/")
.map(|s| s.to_string())
.collect::<Vec<String>>();
//println!("tmp: {:?}",tmp);
tmp[1] = format!("{}8/{}", tmp[1], boo(ssut51(tmp[6].as_str()), ssut51(tmp[7].as_str())));
tmp[1] = format!(
"{}8/{}",
tmp[1],
boo(ssut51(tmp[6].as_str()), ssut51(tmp[7].as_str()))
);
//println!("tmp[1]: {:?}",tmp[1]);
//preda
tmp[5] = format!(
@@ -62,17 +67,25 @@ impl SxyprnProxy {
tmp[5].parse::<u32>().unwrap() - ssut51(tmp[6].as_str()) - ssut51(tmp[7].as_str())
);
//println!("tmp: {:?}",tmp);
let sxyprn_video_url = format!("https://sxyprn.com{}",tmp.join("/"));
let sxyprn_video_url = format!("https://sxyprn.com{}", tmp.join("/"));
let response = requester.get_raw(&sxyprn_video_url).await;
match response {
Ok(resp) => {
return format!("https:{}", resp.headers().get("Location").unwrap().to_str().unwrap_or("").to_string());
},
return format!(
"https:{}",
resp.headers()
.get("Location")
.unwrap()
.to_str()
.unwrap_or("")
.to_string()
);
}
Err(e) => {
println!("Error fetching video URL: {}", e);
}
}
return "".to_string();
}
}
}