rates/backend/services
jtricerolph ca76bc2f90 Fix proxy never being used in hotel-page scraper
_proxy_enabled() was checking cfg.get('server') but load_config() returns
{host, port, username, ...} — no 'server' key. Server URL is built by
proxy_util.playwright_proxy(). This meant proxy was silently disabled
and _proxy_kwargs() would also KeyError if called.

- _proxy_enabled() now delegates to proxy_util.is_enabled() (checks host+username)
- _proxy_kwargs() now calls proxy_util.playwright_proxy() with credentials
  embedded in the URL (avoids 14s DataImpulse 407 round-trip)
- _get_context() generates a sticky session_id per context so each worker
  gets a distinct residential IP lane

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-10 00:21:42 +00:00
..
direct_profiles Add Rate Monitor app — Booking.com + direct booking engine competitor rates 2026-07-05 12:06:30 +00:00
scraper_backends Fix proxy never being used in hotel-page scraper 2026-07-10 00:21:42 +00:00
__init__.py Add Rate Monitor app — Booking.com + direct booking engine competitor rates 2026-07-05 12:06:30 +00:00
booking_scraper.py Allow parallel workers for hotel-page scraper without proxy 2026-07-10 00:18:56 +00:00
central_settings.py Add Rate Monitor app — Booking.com + direct booking engine competitor rates 2026-07-05 12:06:30 +00:00
direct_scraper.py Extract shared proxy module; make it available to direct scraper; remove dead code 2026-07-05 22:55:24 +00:00
newbook_rates_client.py Port occupancy sync + category ordering from the forecasting version 2026-07-05 14:18:03 +00:00
proxy.py Fix proxy 407 round-trip causing 14s latency per page.goto() 2026-07-09 20:14:09 +00:00