This commit is contained in:
Simon
2025-12-25 07:07:14 +00:00
parent 11c8c1a48f
commit 0e347234b3
2 changed files with 20 additions and 7 deletions

View File

@@ -3,13 +3,13 @@ use crate::providers::Provider;
use crate::util::cache::VideoCache; use crate::util::cache::VideoCache;
use crate::util::requester::Requester; use crate::util::requester::Requester;
use crate::util::time::parse_time_to_seconds; use crate::util::time::parse_time_to_seconds;
use crate::videos::VideoItem;
use crate::videos::ServerOptions; use crate::videos::ServerOptions;
use crate::videos::VideoItem;
use async_trait::async_trait;
use error_chain::error_chain; use error_chain::error_chain;
use htmlentity::entity::{ICodedDataTrait, decode}; use htmlentity::entity::{ICodedDataTrait, decode};
use scraper::{Html, Selector}; use scraper::{Html, Selector};
use std::vec; use std::vec;
use async_trait::async_trait;
error_chain! { error_chain! {
foreign_links { foreign_links {
@@ -115,7 +115,10 @@ impl SxyprnProvider {
let search_string = query.replace(" ", "-"); let search_string = query.replace(" ", "-");
let url_str = format!( let url_str = format!(
"{}/{}.html?page={}&sm={}", "{}/{}.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. // Check our Video Cache. If the result is younger than 1 hour, we return it.
let old_items = match cache.get(&url_str) { let old_items = match cache.get(&url_str) {
@@ -197,7 +200,7 @@ impl SxyprnProvider {
.unwrap_or(title) .unwrap_or(title)
.replace(" ", " "); .replace(" ", " ");
title = title.replace(" + ", " ").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(); title = title[4..].to_string();
} }
// println!("Title: {}", title); // println!("Title: {}", title);
@@ -264,11 +267,17 @@ impl SxyprnProvider {
.to_string(); .to_string();
url 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::<Vec<String>>(); .collect::<Vec<String>>();
let video_item_url = match stream_urls.first() { let video_item_url = match stream_urls.first() {
Some(u) => u.clone(), 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( let mut video_item = VideoItem::new(
id, id,

View File

@@ -47,17 +47,21 @@ impl SxyprnProxy {
let data_string = text.split("data-vnfo='").collect::<Vec<&str>>()[1] let data_string = text.split("data-vnfo='").collect::<Vec<&str>>()[1]
.split("\":\"").collect::<Vec<&str>>()[1] .split("\":\"").collect::<Vec<&str>>()[1]
.split("\"}").collect::<Vec<&str>>()[0].replace("\\",""); .split("\"}").collect::<Vec<&str>>()[0].replace("\\","");
//println!("src: {}",data_string);
let mut tmp = data_string let mut tmp = data_string
.split("/") .split("/")
.map(|s| s.to_string()) .map(|s| s.to_string())
.collect::<Vec<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 //preda
tmp[5] = format!( tmp[5] = format!(
"{}", "{}",
tmp[5].parse::<u32>().unwrap() - ssut51(tmp[6].as_str()) - ssut51(tmp[7].as_str()) 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; let response = requester.get_raw(&sxyprn_video_url).await;