From 0e347234b3590b90d9c81d4cdab458f468717d55 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 25 Dec 2025 07:07:14 +0000 Subject: [PATCH] bugfixes --- src/providers/sxyprn.rs | 21 +++++++++++++++------ src/proxies/sxyprn.rs | 6 +++++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/providers/sxyprn.rs b/src/providers/sxyprn.rs index 478ee22..8a381c7 100644 --- a/src/providers/sxyprn.rs +++ b/src/providers/sxyprn.rs @@ -3,13 +3,13 @@ use crate::providers::Provider; use crate::util::cache::VideoCache; use crate::util::requester::Requester; use crate::util::time::parse_time_to_seconds; -use crate::videos::VideoItem; use crate::videos::ServerOptions; +use crate::videos::VideoItem; +use async_trait::async_trait; use error_chain::error_chain; use htmlentity::entity::{ICodedDataTrait, decode}; use scraper::{Html, Selector}; use std::vec; -use async_trait::async_trait; error_chain! { foreign_links { @@ -115,7 +115,10 @@ impl SxyprnProvider { let search_string = query.replace(" ", "-"); let url_str = format!( "{}/{}.html?page={}&sm={}", - self.url, search_string, ((page as u32) - 1) * 20, sort_string + self.url, + search_string, + ((page as u32) - 1) * 20, + sort_string ); // Check our Video Cache. If the result is younger than 1 hour, we return it. let old_items = match cache.get(&url_str) { @@ -197,7 +200,7 @@ impl SxyprnProvider { .unwrap_or(title) .replace(" ", " "); title = title.replace(" + ", " ").replace(" ", " "); - if title.to_ascii_lowercase().starts_with("new "){ + if title.to_ascii_lowercase().starts_with("new ") { title = title[4..].to_string(); } // println!("Title: {}", title); @@ -264,11 +267,17 @@ impl SxyprnProvider { .to_string(); url }) - .filter(|url| url.starts_with("http") && !url.starts_with("https://bigwarp.io/") && !url.starts_with("https://doodstream.com/")) + .filter(|url| { + url.starts_with("http") + && !url.starts_with("https://bigwarp.io/") + && !url.starts_with("https://doodstream.com/") + && !url.starts_with("https://strmup.to/") + && !url.starts_with("https://streamtape.com/") + }) .collect::>(); let video_item_url = match stream_urls.first() { Some(u) => u.clone(), - None => video_url.clone(), + None => format!("https://hottub.spacemoehre.de/proxy/sxyprn/post/{}",id)//video_url.clone(), }; let mut video_item = VideoItem::new( id, diff --git a/src/proxies/sxyprn.rs b/src/proxies/sxyprn.rs index db46081..ae07900 100644 --- a/src/proxies/sxyprn.rs +++ b/src/proxies/sxyprn.rs @@ -47,17 +47,21 @@ impl SxyprnProxy { let data_string = text.split("data-vnfo='").collect::>()[1] .split("\":\"").collect::>()[1] .split("\"}").collect::>()[0].replace("\\",""); - + //println!("src: {}",data_string); let mut tmp = data_string .split("/") .map(|s| s.to_string()) .collect::>(); + //println!("tmp: {:?}",tmp); 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!( "{}", tmp[5].parse::().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 response = requester.get_raw(&sxyprn_video_url).await;