juftin / camply

camply, the campsite finder ⛺️ - a tool to find campsites at sold out campgrounds through sites like recreation.gov
https://juftin.com/camply/
MIT License
464 stars 89 forks source link

Yellowstone Availability before start date? #347

Open zhazell opened 3 months ago

zhazell commented 3 months ago

Describe the bug

I have a start date of 2024-06-13 with 3 nights to get Thurs-Sun, but the alert triggers availability for a site starting on 2024-06-11 and 2024-06-12. Shouldn't it only alert when there is availability starting on the start-date?

Original Camply Command (with --debug) camply --provider Yellowstone campsites --campground YLYF:RV --campground YLYM:RV --campground YLYB:RV --start-date 2024-06-13 --end-date 2024-06-16 --nights 3 --search-forever --notifications pushover --polling-interval 5 --debug

[2024-05-01 09:41:25] CAMPLY   camply, the campsite finder ⛺️
[2024-05-01 09:41:25] DEBUG    Setting up camply debugging
[2024-05-01 09:41:25] DEBUG    Camply Version: 0.32.6
[2024-05-01 09:41:25] DEBUG    Python Version: 3.10.12
[2024-05-01 09:41:25] DEBUG    Platform: linux
[2024-05-01 09:41:25] INFO     Using Camply Provider: "Yellowstone"
[2024-05-01 09:41:25] INFO     3 booking nights selected for search, ranging from 2024-06-13 to 2024-06-15
[2024-05-01 09:41:25] INFO     Searching for availabilities with 3 consecutive night stays.
[2024-05-01 09:41:25] INFO     Searching for campsites every 5 minutes.
[2024-05-01 09:41:25] INFO     Notifications active via: <SilentNotifications>, <PushoverNotifications>
[2024-05-01 09:41:25] INFO     3 Matching Campgrounds Found
[2024-05-01 09:41:25] INFO     ⛰  Yellowstone National Park, USA (#1) - 🏕  Bridge Bay Campground (YLYB:RV)
[2024-05-01 09:41:25] INFO     ⛰  Yellowstone National Park, USA (#1) - 🏕  Fishing Bridge RV Park (YLYF:RV)
[2024-05-01 09:41:25] INFO     ⛰  Yellowstone National Park, USA (#1) - 🏕  Madison Campground (YLYM:RV)
[2024-05-01 09:41:25] INFO     Searching for Yellowstone Lodging Availability: June, 2024
[2024-05-01 09:41:25] DEBUG    Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 09:41:30] DEBUG    https://webapi.xanterra.net:443 "GET /v1/api/availability/hotels/yellowstonenationalparklodges?date=2024-06-01&limit=31&rate_code=INTERNET&nights=3 HTTP/1.1" 200 None
[2024-05-01 09:41:31] INFO             ⛺️      14 sites found.
[2024-05-01 09:41:31] DEBUG    Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 09:41:31] DEBUG    https://webapi.xanterra.net:443 "GET /v1/api/availability/rooms/yellowstonenationalparklodges/YLYB:RV?date=2024-06-01&limit=31&nights=3 HTTP/1.1" 200 None
[2024-05-01 09:41:32] DEBUG    Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 09:41:33] DEBUG    https://webapi.xanterra.net:443 "GET /v1/api/availability/rooms/yellowstonenationalparklodges/YLYF:RV?date=2024-06-01&limit=31&nights=3 HTTP/1.1" 200 None
[2024-05-01 09:41:33] DEBUG    Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 09:41:34] DEBUG    https://webapi.xanterra.net:443 "GET /v1/api/availability/rooms/yellowstonenationalparklodges/YLYM:RV?date=2024-06-01&limit=31&nights=3 HTTP/1.1" 200 None
[2024-05-01 09:41:34] DEBUG    Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 09:41:35] DEBUG    https://webapi.xanterra.net:443 "GET /v1/api/property/rooms/yellowstonenationalparklodges/YLYB:RV HTTP/1.1" 200 None
[2024-05-01 09:41:35] DEBUG    Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 09:41:36] DEBUG    https://webapi.xanterra.net:443 "GET /v1/api/property/rooms/yellowstonenationalparklodges/YLYF:RV HTTP/1.1" 200 None
[2024-05-01 09:41:36] DEBUG    Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 09:41:37] DEBUG    https://webapi.xanterra.net:443 "GET /v1/api/property/rooms/yellowstonenationalparklodges/YLYM:RV HTTP/1.1" 200 None
[2024-05-01 09:41:37] INFO     ⛺️ ⛺️ ⛺️ ⛺️ 2 Reservable Campsites Matching Search Preferences
[2024-05-01 09:41:37] INFO     📅 Tue, June 11 🏕  1 sites
[2024-05-01 09:41:37] INFO             ⛰️  Yellowstone  🏕  Fishing Bridge RV Internet Rate: ⛺ 1 sites
[2024-05-01 09:41:37] INFO                     🔗 https://secure.yellowstonenationalparklodges.com/booking/lodging-select?dateFrom=06-11-2024&adults=1&destination=YLYF%3ARV&children=0&nights=3 (3 nights)
[2024-05-01 09:41:37] INFO     📅 Wed, June 12 🏕  1 sites
[2024-05-01 09:41:37] INFO             ⛰️  Yellowstone  🏕  Fishing Bridge RV Internet Rate: ⛺ 1 sites
[2024-05-01 09:41:37] INFO                     🔗 https://secure.yellowstonenationalparklodges.com/booking/lodging-select?dateFrom=06-12-2024&adults=1&destination=YLYF%3ARV&children=0&nights=3 (3 nights)
[2024-05-01 09:41:37] INFO     2 New Campsites Found.
[2024-05-01 09:41:37] DEBUG    SilentNotification:
                                       • 2024-06-11 - 2024-06-14
                                       • RV
                                       • RV Site up to 70-ft
                                       • Yellowstone
                                       • Fishing Bridge RV Internet Rate
                                       • https://secure.yellowstonenationalparklodges.com/booking/lodging-select?dateFrom=06-11-2024&adults=1&destination=YLYF%3ARV&children=0&nights=3
[2024-05-01 09:41:37] DEBUG    Campsite Info: {'availability_status': 'Available',
                                'booking_date': datetime.datetime(2024, 6, 11, 0, 0),
                                'booking_end_date': datetime.datetime(2024, 6, 14, 0, 0),
                                'booking_nights': 3,
                                'booking_url': 'https://secure.yellowstonenationalparklodges.com/booking/lodging-select?dateFrom=06-11-2024&adults=1&destination=YLYF%3ARV&children=0&nights=3',
                                'campsite_attributes': None,
                                'campsite_id': 'M70F',
                                'campsite_loop_name': 'N/A',
                                'campsite_occupancy': (1, 6),
                                'campsite_site_name': 'RV Site up to 70-ft',
                                'campsite_type': 'RV',
                                'campsite_use_type': 'RV',
                                'facility_id': 'YLYF:RV',
                                'facility_name': 'Fishing Bridge RV Internet Rate',
                                'location': None,
                                'permitted_equipment': None,
                                'recreation_area': 'Yellowstone',
                                'recreation_area_id': 1}
[2024-05-01 09:41:37] DEBUG    SilentNotification:
                                       • 2024-06-12 - 2024-06-15
                                       • RV
                                       • RV Site up to 70-ft
                                       • Yellowstone
                                       • Fishing Bridge RV Internet Rate
                                       • https://secure.yellowstonenationalparklodges.com/booking/lodging-select?dateFrom=06-12-2024&adults=1&destination=YLYF%3ARV&children=0&nights=3
[2024-05-01 09:41:37] DEBUG    Campsite Info: {'availability_status': 'Available',
                                'booking_date': datetime.datetime(2024, 6, 12, 0, 0),
                                'booking_end_date': datetime.datetime(2024, 6, 15, 0, 0),
                                'booking_nights': 3,
                                'booking_url': 'https://secure.yellowstonenationalparklodges.com/booking/lodging-select?dateFrom=06-12-2024&adults=1&destination=YLYF%3ARV&children=0&nights=3',
                                'campsite_attributes': None,
                                'campsite_id': 'M70F',
                                'campsite_loop_name': 'N/A',
                                'campsite_occupancy': (1, 6),
                                'campsite_site_name': 'RV Site up to 70-ft',
                                'campsite_type': 'RV',
                                'campsite_use_type': 'RV',
                                'facility_id': 'YLYF:RV',
                                'facility_name': 'Fishing Bridge RV Internet Rate',
                                'location': None,
                                'permitted_equipment': None,
                                'recreation_area': 'Yellowstone',
                                'recreation_area_id': 1}

Additional context

This site just opened up and thought I scored, but it's missing the Saturday night reservation. Start-date of 2024-06-13 with 3 nights should go to 2024-06-16

juftin commented 3 months ago

🤔 this is an interesting one. The Yellowstone provider is one that allows us to pass the number of nights as a parameter directly to their API - for other providers we calculate this dynamically and assemble multi-night bookings ourselves.

This one may take a bit of time as I expect that Xanterra is making changes to their API implementation. I'll follow up once I have a solution in mind.