rates/backend
jtricerolph b916f1a09b Fix Guestline + Mews direct scrapers after engine API changes
Both competitor booking engines changed their API contracts, silently
breaking their direct scrapes ~16 days ago (200 responses with empty
bodies, so no exception was ever raised):

- Guestline: the /enhanced availability endpoint now returns a bare []
  for every date. Switch to the base /api/availabilities/{coll}/{hotel}
  endpoint, which returns {"rooms":[...]} with the same room shape.
- Mews: getAvailability now rejects the old body with "Invalid
  EnterpriseId" — it requires enterpriseId + serviceId. getPricing
  additionally requires currencyCode. Capture the enterprise's
  defaultCurrencyCode in _ensure_config and send all three.

Also stop last_scraped_at advancing when a run saves 0 rows, so the
overview no longer reports a phantom-fresh scrape while the per-date
data stays stale — the symptom that surfaced this.

Verified live: Three Ways now yields 41 rows/night, Old Stocks 10.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-13 14:09:13 +00:00
..
api Add configurable 30-day NewBook rate rescrape on 2/4/6/12h intervals 2026-07-15 09:44:18 +00:00
jobs Auto-recheck parity after scrape + manual Recheck button + faster badge 2026-07-15 09:33:33 +00:00
services Fix Guestline + Mews direct scrapers after engine API changes 2026-08-13 14:09:13 +00:00
auth.py
database.py
Dockerfile Revert Firefox: root cause was broken DataImpulse nodes not fingerprinting 2026-07-10 09:54:50 +00:00
main.py Add Power BI reporting endpoints — flat tabular data via API key auth 2026-07-14 17:27:50 +00:00
migrate_direct_data.py
requirements.txt
scheduler.py Add configurable 30-day NewBook rate rescrape on 2/4/6/12h intervals 2026-07-15 09:44:18 +00:00
schema.sql Use text-search approach for rate conditions (breakfast/cancel/payment) 2026-07-14 18:10:00 +00:00