handled some warnings
This commit is contained in:
@@ -8,7 +8,7 @@ use error_chain::error_chain;
|
||||
use htmlentity::entity::{ICodedDataTrait, decode};
|
||||
use std::env;
|
||||
use std::vec;
|
||||
use wreq::{Client, Proxy};
|
||||
use wreq::{Client};
|
||||
use wreq_util::Emulation;
|
||||
|
||||
error_chain! {
|
||||
@@ -54,7 +54,7 @@ impl HomoxxxProvider {
|
||||
}
|
||||
};
|
||||
|
||||
let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
// let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?;
|
||||
|
||||
let mut response = client.get(video_url.clone())
|
||||
@@ -133,7 +133,7 @@ impl HomoxxxProvider {
|
||||
}
|
||||
};
|
||||
|
||||
let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
// let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?;
|
||||
|
||||
let mut response = client.get(video_url.clone())
|
||||
|
||||
@@ -67,7 +67,6 @@ impl MissavProvider {
|
||||
async fn query(&self, cache: VideoCache, pool:DbPool, page: u8, query: &str, sort: String, options: ServerOptions) -> Result<Vec<VideoItem>> {
|
||||
// Extract needed fields from options at the start
|
||||
let language = options.language.clone().unwrap();
|
||||
let filter = options.filter.clone().unwrap();
|
||||
let mut requester = options.requester.clone().unwrap();
|
||||
let search_string = query.replace(" ", "%20");
|
||||
let url_str = format!(
|
||||
|
||||
@@ -8,7 +8,7 @@ use error_chain::error_chain;
|
||||
use htmlentity::entity::{ICodedDataTrait, decode};
|
||||
use std::env;
|
||||
use std::vec;
|
||||
use wreq::{Client, Proxy};
|
||||
use wreq::{Client};
|
||||
use wreq_util::Emulation;
|
||||
|
||||
error_chain! {
|
||||
@@ -54,7 +54,7 @@ impl OkpornProvider {
|
||||
}
|
||||
};
|
||||
|
||||
let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
// let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?;
|
||||
|
||||
let mut response = client.get(video_url.clone())
|
||||
@@ -129,7 +129,7 @@ impl OkpornProvider {
|
||||
}
|
||||
};
|
||||
|
||||
let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
// let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?;
|
||||
|
||||
let mut response = client.get(video_url.clone())
|
||||
|
||||
@@ -9,7 +9,7 @@ use error_chain::error_chain;
|
||||
use htmlentity::entity::{ICodedDataTrait, decode};
|
||||
use std::env;
|
||||
use std::vec;
|
||||
use wreq::{Client, Proxy};
|
||||
use wreq::{Client};
|
||||
use wreq_util::Emulation;
|
||||
|
||||
error_chain! {
|
||||
@@ -55,7 +55,7 @@ impl OkxxxProvider {
|
||||
}
|
||||
};
|
||||
|
||||
let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
// let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?;
|
||||
|
||||
let mut response = client.get(video_url.clone())
|
||||
@@ -134,7 +134,7 @@ impl OkxxxProvider {
|
||||
}
|
||||
};
|
||||
|
||||
let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
// let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?;
|
||||
|
||||
let mut response = client.get(video_url.clone())
|
||||
|
||||
@@ -9,7 +9,7 @@ use error_chain::error_chain;
|
||||
use htmlentity::entity::{ICodedDataTrait, decode};
|
||||
use std::env;
|
||||
use std::vec;
|
||||
use wreq::{Client, Proxy};
|
||||
use wreq::{Client};
|
||||
use wreq_util::Emulation;
|
||||
|
||||
error_chain! {
|
||||
@@ -55,7 +55,7 @@ impl PerfectgirlsProvider {
|
||||
}
|
||||
};
|
||||
|
||||
let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
// let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?;
|
||||
|
||||
let mut response = client.get(video_url.clone())
|
||||
@@ -134,7 +134,7 @@ impl PerfectgirlsProvider {
|
||||
}
|
||||
};
|
||||
|
||||
let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
// let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?;
|
||||
|
||||
let mut response = client.get(video_url.clone())
|
||||
|
||||
@@ -270,7 +270,7 @@ impl PmvhavenProvider {
|
||||
}
|
||||
};
|
||||
|
||||
let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
// let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
let client = Client::builder()
|
||||
.cert_verification(false)
|
||||
.emulation(Emulation::Firefox136)
|
||||
@@ -300,34 +300,6 @@ impl PmvhavenProvider {
|
||||
}
|
||||
return Ok(video_items);
|
||||
}
|
||||
// else {
|
||||
// let flare_url = env::var("FLARE_URL").expect("FLARE_URL not set");
|
||||
// let flare = Flaresolverr::new(flare_url);
|
||||
// let result = flare
|
||||
// .solve(FlareSolverrRequest {
|
||||
// cmd: "request.get".to_string(),
|
||||
// url: url.clone(),
|
||||
// maxTimeout: 60000,
|
||||
// })
|
||||
// .await;
|
||||
// let video_items = match result {
|
||||
// Ok(res) => {
|
||||
// // println!("FlareSolverr response: {}", res);
|
||||
// self.get_video_items_from_html(res.solution.response)
|
||||
// }
|
||||
// Err(e) => {
|
||||
// println!("Error solving FlareSolverr: {}", e);
|
||||
// return Err("Failed to solve FlareSolverr".into());
|
||||
// }
|
||||
// };
|
||||
// if !video_items.is_empty() {
|
||||
// cache.remove(&url);
|
||||
// cache.insert(url.clone(), video_items.clone());
|
||||
// } else {
|
||||
// return Ok(old_items);
|
||||
// }
|
||||
// Ok(video_items)
|
||||
// }
|
||||
Err("Failed to get Videos".into())
|
||||
}
|
||||
async fn query(&self, cache: VideoCache, page: u8, query: &str) -> Result<Vec<VideoItem>> {
|
||||
@@ -349,7 +321,7 @@ impl PmvhavenProvider {
|
||||
}
|
||||
};
|
||||
|
||||
let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
// let proxy = Proxy::all("http://192.168.0.103:8081").unwrap();
|
||||
let client = Client::builder()
|
||||
.cert_verification(false)
|
||||
.emulation(Emulation::Firefox136)
|
||||
|
||||
Reference in New Issue
Block a user