The 'We have X left' scarcity indicator only appears when availability is low (typically ≤5). The quantity <select> dropdown in the booking form always shows 0..N where N = actual available qty (capped at 10). Extract max option value from the <select> in the last table cell per rate plan row, falling back to regex parsing of the cell text if the select isn't rendered, then to the scarcity text as a last resort. Stored in both rooms_left and available_qty on RateData. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| base.py | ||
| playwright_hotel_page.py | ||
| playwright_local.py | ||