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::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::<Vec<String>>();
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,