From ef7c4790ca8763218017eb7e1b76f6e054d24170 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Fri, 10 Jul 2026 09:54:50 +0000 Subject: [PATCH] Revert Firefox: root cause was broken DataImpulse nodes not fingerprinting DataImpulse has two broken gateway nodes (.89, .97) and one working (.105). Production DNS round-robin consistently landed on broken nodes. Fix is to pin the proxy host to 67.213.121.105 in system_config. Revert to Chromium. Co-Authored-By: Claude Sonnet 4.6 --- backend/Dockerfile | 2 +- .../scraper_backends/playwright_hotel_page.py | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index c62474a..e59aa13 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -14,7 +14,7 @@ COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Playwright + Chromium for Booking.com scraper -RUN playwright install chromium firefox --with-deps +RUN playwright install chromium --with-deps COPY . . diff --git a/backend/services/scraper_backends/playwright_hotel_page.py b/backend/services/scraper_backends/playwright_hotel_page.py index 18ea092..93d7328 100644 --- a/backend/services/scraper_backends/playwright_hotel_page.py +++ b/backend/services/scraper_backends/playwright_hotel_page.py @@ -220,13 +220,16 @@ class PlaywrightHotelPageBackend(ScraperBackend): if not self._pw: self._pw = await async_playwright().start() if not self._browser: - self._browser = await self._pw.firefox.launch( + self._browser = await self._pw.chromium.launch( headless=True, - firefox_user_prefs={ - # Block images — saves ~75% of proxy bandwidth from cf.bstatic.com. - # Firefox pref equivalent of Chrome's --blink-settings=imagesEnabled=false. - 'permissions.default.image': 2, - }, + args=[ + '--no-sandbox', + '--disable-dev-shm-usage', + '--disable-blink-features=AutomationControlled', + '--disable-infobars', + '--disable-extensions', + '--blink-settings=imagesEnabled=false', + ], ) async def _get_context(self) -> BrowserContext: