diff --git a/src/providers/pornhub.rs b/src/providers/pornhub.rs index ed07d9a..2f93ca1 100644 --- a/src/providers/pornhub.rs +++ b/src/providers/pornhub.rs @@ -1,6 +1,6 @@ use crate::DbPool; use crate::api::ClientVersion; -use crate::providers::{Provider, report_provider_error, requester_or_default}; +use crate::providers::{Provider, proxy_aylo_thumb, report_provider_error, requester_or_default}; use crate::status::*; use crate::util::cache::VideoCache; use crate::util::parse_abbreviated_number; @@ -624,7 +624,13 @@ impl PornhubProvider { }; let items = match self.parse_listing_page(&text, scope) { - Ok(items) => items, + // `pix-cdn77.phncdn.com` thumbs answer 403 without a matching Referer. + Ok(mut items) => { + for item in items.iter_mut() { + item.thumb = proxy_aylo_thumb(&options, &item.thumb); + } + items + } Err(error) => { report_provider_error( CHANNEL_ID,