reenable proxy
This commit is contained in:
@@ -55,12 +55,12 @@ impl PornhubProvider {
|
||||
let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?;
|
||||
|
||||
let mut response = client.get(url.clone())
|
||||
// .proxy(proxy.clone())
|
||||
.proxy(proxy.clone())
|
||||
.send().await?;
|
||||
if response.status().is_redirection(){
|
||||
|
||||
response = client.get(self.url.clone() + response.headers()["Location"].to_str().unwrap())
|
||||
// .proxy(proxy)
|
||||
.proxy(proxy)
|
||||
.send().await?;
|
||||
}
|
||||
if response.status().is_success() {
|
||||
@@ -154,13 +154,13 @@ impl PornhubProvider {
|
||||
let client = Client::builder().cert_verification(false).emulation(Emulation::Firefox136).build()?;
|
||||
|
||||
let mut response = client.get(url.clone())
|
||||
// .proxy(proxy.clone())
|
||||
.proxy(proxy.clone())
|
||||
.send().await?;
|
||||
|
||||
if response.status().is_redirection(){
|
||||
|
||||
response = client.get(self.url.clone() + response.headers()["Location"].to_str().unwrap())
|
||||
// .proxy(proxy)
|
||||
.proxy(proxy)
|
||||
.send().await?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user