This commit is contained in:
Simon
2025-06-03 19:26:26 +00:00
parent 2ddc5e86e2
commit 8d5da3a4dc
2 changed files with 30 additions and 9 deletions

View File

@@ -146,6 +146,10 @@ impl PerverzijaProvider {
fn get_video_items_from_html(&self, html: String) -> Vec<Video_Item> { fn get_video_items_from_html(&self, html: String) -> Vec<Video_Item> {
// println!("HTML: {}", html); // println!("HTML: {}", html);
if html.is_empty() {
println!("HTML is empty");
return vec![];
}
let mut items: Vec<Video_Item> = Vec::new(); let mut items: Vec<Video_Item> = Vec::new();
let video_listing_content = html.split("video-listing-content").collect::<Vec<&str>>()[1]; let video_listing_content = html.split("video-listing-content").collect::<Vec<&str>>()[1];
let raw_videos = video_listing_content let raw_videos = video_listing_content
@@ -172,7 +176,7 @@ impl PerverzijaProvider {
let url = vid[1].split("iframe src=&quot;").collect::<Vec<&str>>()[1] let url = vid[1].split("iframe src=&quot;").collect::<Vec<&str>>()[1]
.split("&quot;") .split("&quot;")
.collect::<Vec<&str>>()[0] .collect::<Vec<&str>>()[0]
.to_string(); .to_string().replace("index.php", "xs1.php");
let id = url.split("data=").collect::<Vec<&str>>()[1] let id = url.split("data=").collect::<Vec<&str>>()[1]
.split("&") .split("&")
.collect::<Vec<&str>>()[0] .collect::<Vec<&str>>()[0]
@@ -205,10 +209,11 @@ impl PerverzijaProvider {
.split("'") .split("'")
.collect::<Vec<&str>>()[0] .collect::<Vec<&str>>()[0]
.to_string(); .to_string();
let referer_url = vid[1].split("data-url='").collect::<Vec<&str>>()[1] // let referer_url = vid[1].split("data-url='").collect::<Vec<&str>>()[1]
.split("'") // .split("'")
.collect::<Vec<&str>>()[0] // .collect::<Vec<&str>>()[0]
.to_string(); // .to_string();
let referer_url = "https://xtremestream.xyz/".to_string();
let embed = Video_Embed::new(embed_html, url.clone()); let embed = Video_Embed::new(embed_html, url.clone());
let mut tags: Vec<String> = Vec::new(); // Placeholder for tags, adjust as needed let mut tags: Vec<String> = Vec::new(); // Placeholder for tags, adjust as needed
@@ -228,8 +233,8 @@ impl PerverzijaProvider {
"perverzija".to_string(), "perverzija".to_string(),
thumb, thumb,
duration, duration,
).tags(tags) ).tags(tags);
.embed(embed.clone()); // .embed(embed.clone());
let mut format = let mut format =
videos::Video_Format::new(url.clone(), "1080".to_string(), "m3u8".to_string()); videos::Video_Format::new(url.clone(), "1080".to_string(), "m3u8".to_string());
format.add_http_header("Referer".to_string(), referer_url.clone()); format.add_http_header("Referer".to_string(), referer_url.clone());
@@ -328,8 +333,8 @@ impl PerverzijaProvider {
thumb, thumb,
duration, duration,
) )
.tags(tags) .tags(tags);
.embed(embed.clone()); // .embed(embed.clone());
let mut format = let mut format =
videos::Video_Format::new(url.clone(), "1080".to_string(), "m3u8".to_string()); videos::Video_Format::new(url.clone(), "1080".to_string(), "m3u8".to_string());
format.add_http_header("Referer".to_string(), referer_url.clone()); format.add_http_header("Referer".to_string(), referer_url.clone());

View File

@@ -1,7 +1,23 @@
use std::collections::HashMap; use std::collections::HashMap;
#[derive(serde::Serialize, serde::Deserialize, Debug)] #[derive(serde::Serialize, serde::Deserialize, Debug)]
pub struct Videos_Request { pub struct Videos_Request {
//"versionInstallDate":"2025-06-03T18:20:20Z","languageCode":"en","appInstallDate":"2025-06-03T18:20:20Z","server":"spacemoehre","sexu
pub clientHash: String, // "a07b23c9b07813c65050e2a4041ca777",
pub blockedKeywords: Option<String>, // "kittens",
pub countryCode: Option<String>, // "DE",
pub clientVersion: Option<String>, // "2.1.4-22b",
pub timestamp: Option<String>, // "1748976686",
pub blockedUploaders: Option<String>, // "",
pub anonId: Option<String>, // "1AB8A060-A47D-47EF-B9CB-63980ED84C8A",
pub debugTools: Option<bool>, // false,
pub versionInstallDate: Option<String>, // "2025-06-03T18:20:20Z",
pub languageCode: Option<String>, // "en",
pub appInstallDate: Option<String>, // "2025-06-03T18:20:20Z",
pub server: Option<String>, // "spacemoehre",
pub sexuality: Option<String>, // "straight",
pub channel: Option<String>, //"youtube", pub channel: Option<String>, //"youtube",
pub sort: Option<String>, //"new", pub sort: Option<String>, //"new",
pub query: Option<String>, //"kittens", pub query: Option<String>, //"kittens",