diff --git a/app/connectors/direct_scrapers/porndoe.py b/app/connectors/direct_scrapers/porndoe.py index b9113fd..6a78329 100644 --- a/app/connectors/direct_scrapers/porndoe.py +++ b/app/connectors/direct_scrapers/porndoe.py @@ -34,6 +34,7 @@ import logging import re from datetime import date, datetime +from app.config import get_settings from app.connectors.base import ( RawFingerprint, RawPerformer, @@ -144,6 +145,24 @@ def _extract_video_object(html: str) -> dict | None: class PornDoeScraper(BaseBrowseScraper): sitetag = "porndoecom" + def __init__(self) -> None: + super().__init__() + # Bright Data ISP proxy, bo porndoe zaczal oddawac 403 na IP serwerowni. + # Objawialo sie to jako "tub sie wyczerpal", a nie jako blad: ostatnia nowa + # scena wpadla 2026-08-21, watchdog krzyczal 173 h, a scraper po cichu dostawal + # 403 i zero linkow. Sprawdzone 2026-08-31: bez proxy 403 i 0 scen, przez proxy + # 200 i 31 scen z pierwszej strony. + self._proxy = get_settings().brightdata_proxy_url + if not self._proxy: + log.warning("porndoe: BRIGHTDATA_PROXY_URL nieustawione, scraper wylaczony") + + def crawl_page(self, page: int): + # Bez proxy nie ma po co uderzac (gwarantowane 403). Pusta lista = "wyczerpany", + # dzieki czemu deep-crawl nie ponawia w kolko. + if not self._proxy: + return [] + return super().crawl_page(page) + def _listing_url(self, page: int) -> str: if page <= 1: return f"{_BASE}/videos/most-recent"