rates/backend/services
jtricerolph b10b2f5990 Fix page.content() blocking ~2 minutes after goto timeout on Cloudflare hits
When page.goto() times out while Cloudflare's JS challenge redirect is in
progress, page.content() silently blocks until that navigation completes
before raising — adding ~1m46s of hidden delay per blocked-page attempt.

Fix: skip page.content() entirely when page_loaded=False (goto already
timed out), setting content="" so block detection treats it as no signal.

Also break out of the page loop early when page 1 failed to load with 0
hotels — no point spending another 60s on the offset-URL page 2 when the
browser is in a Cloudflare challenge state.

Per-blocked-attempt time: ~4 min → ~1 min (30s goto + 30s selectors).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-09 21:34:37 +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 page.content() blocking ~2 minutes after goto timeout on Cloudflare hits 2026-07-09 21:34:37 +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 Reduce scraper timeouts and raise default concurrency to 6 2026-07-09 21:17:19 +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