pornhub: proxy Referer-gated pix-cdn77 thumbnails
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MUYdCh2nCVsQYgJAT7gwSi
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user