bugfixes
This commit is contained in:
@@ -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) {
|
||||
@@ -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,
|
||||
|
||||
@@ -47,17 +47,21 @@ impl SxyprnProxy {
|
||||
let data_string = text.split("data-vnfo='").collect::<Vec<&str>>()[1]
|
||||
.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())));
|
||||
|
||||
//println!("tmp[1]: {:?}",tmp[1]);
|
||||
//preda
|
||||
tmp[5] = format!(
|
||||
"{}",
|
||||
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 response = requester.get_raw(&sxyprn_video_url).await;
|
||||
|
||||
Reference in New Issue
Block a user