Pin Booking.com search to a dest_id
Free-text ss= destination resolution is non-deterministic: tonight's 30-day run resolved "Stow on the Wold" to St. Wolfgang, Austria for 8 of 30 dates, saving Salzkammergut hotel rates into the matrix. dest_id + dest_type=city in the search URL pins the destination. - booking_scrape_config gains a dest_id column (idempotent ALTER) - scrape_location_search/_build_search_url thread dest_id through - /config/location accepts dest_id Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
270d8293d1
commit
9e5728efb1
5 changed files with 34 additions and 12 deletions
|
|
@ -90,7 +90,8 @@ class ScraperBackend(ABC):
|
|||
check_in: date,
|
||||
check_out: date,
|
||||
adults: int = 2,
|
||||
pages: int = 2
|
||||
pages: int = 2,
|
||||
dest_id: Optional[str] = None
|
||||
) -> ScraperResult:
|
||||
"""
|
||||
Scrape booking.com location search results.
|
||||
|
|
@ -101,6 +102,9 @@ class ScraperBackend(ABC):
|
|||
check_out: Check-out date (typically check_in + 1 for single night)
|
||||
adults: Number of adults for search
|
||||
pages: Number of search result pages to scrape
|
||||
dest_id: Booking.com numeric destination id. Pins the search to one
|
||||
destination — free-text ss= resolves non-deterministically
|
||||
(Stow on the Wold intermittently matched St. Wolfgang, Austria)
|
||||
|
||||
Returns:
|
||||
ScraperResult with hotels and rates found
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue