reenable proxy

This commit is contained in:
Simon
2025-08-01 14:33:17 +00:00
parent 57ed44c2d4
commit faa2cea37e

View File

@@ -55,12 +55,12 @@ impl PornhubProvider {
let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?; let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?;
let mut response = client.get(url.clone()) let mut response = client.get(url.clone())
// .proxy(proxy.clone()) .proxy(proxy.clone())
.send().await?; .send().await?;
if response.status().is_redirection(){ if response.status().is_redirection(){
response = client.get(self.url.clone() + response.headers()["Location"].to_str().unwrap()) response = client.get(self.url.clone() + response.headers()["Location"].to_str().unwrap())
// .proxy(proxy) .proxy(proxy)
.send().await?; .send().await?;
} }
if response.status().is_success() { if response.status().is_success() {
@@ -154,13 +154,13 @@ impl PornhubProvider {
let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?; let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?;
let mut response = client.get(url.clone()) let mut response = client.get(url.clone())
// .proxy(proxy.clone()) .proxy(proxy.clone())
.send().await?; .send().await?;
if response.status().is_redirection(){ if response.status().is_redirection(){
response = client.get(self.url.clone() + response.headers()["Location"].to_str().unwrap()) response = client.get(self.url.clone() + response.headers()["Location"].to_str().unwrap())
// .proxy(proxy) .proxy(proxy)
.send().await?; .send().await?;
} }