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

ReserveCalifornia does not detect available campsites #336

Closed vassoz closed 3 months ago

vassoz commented 3 months ago

Describe the bug

ReserveCalifornia shows 0 availability for me

Original Camply Command (with --debug)

$ camply --debug --provider ReserveCalifornia campsites --rec-area 726 --start-date 2024-04-29 --end-date 2024-04-30
[2024-04-25 08:45:29] CAMPLY   camply, the campsite finder ⛺️                                                                                  
[2024-04-25 08:45:29] DEBUG    Setting up camply debugging                                                                                     
[2024-04-25 08:45:29] DEBUG    Camply Version: 0.32.2                                                                                          
[2024-04-25 08:45:29] DEBUG    Python Version: 3.10.12                                                                                         
[2024-04-25 08:45:29] DEBUG    Platform: linux                                                                                                 
[2024-04-25 08:45:29] INFO     Using Camply Provider: "ReserveCalifornia"                                                                      
[2024-04-25 08:45:29] INFO     1 booking nights selected for search, ranging from 2024-04-29 to 2024-04-29                                     
[2024-04-25 08:45:29] INFO     Searching across 3 campgrounds                                                                                  
[2024-04-25 08:45:29] INFO         ⛰  Sunset SB (#726) - 🏕  Pines Hollow and Dunes Camp (Sites 38 – 90) (#734)                                 
[2024-04-25 08:45:29] INFO         ⛰  Sunset SB (#726) - 🏕  Sunset Group Area (#735)                                                           
[2024-04-25 08:45:29] INFO         ⛰  Sunset SB (#726) - 🏕  South Camp (sites 1-37) (#737)                                                     
[2024-04-25 08:45:29] INFO     Searching Pines Hollow and Dunes Camp (Sites 38 – 90), Sunset SB (734) for availability: April, 2024            
[2024-04-25 08:45:29] DEBUG    Starting new HTTPS connection (1): calirdr.usedirect.com:443                                                    
[2024-04-25 08:45:29] DEBUG    https://calirdr.usedirect.com:443 "POST /rdr/rdr/search/grid HTTP/1.1" 200 None                                 
[2024-04-25 08:45:30] INFO             ❌       0 total sites found in month of April                                                          
[2024-04-25 08:45:30] INFO     Searching Sunset Group Area, Sunset SB (735) for availability: April, 2024                                      
[2024-04-25 08:45:30] DEBUG    https://calirdr.usedirect.com:443 "POST /rdr/rdr/search/grid HTTP/1.1" 200 None                                 
[2024-04-25 08:45:30] INFO             ❌       0 total sites found in month of April                                                          
[2024-04-25 08:45:30] INFO     Searching South Camp (sites 1-37), Sunset SB (737) for availability: April, 2024                                
[2024-04-25 08:45:31] DEBUG    https://calirdr.usedirect.com:443 "POST /rdr/rdr/search/grid HTTP/1.1" 200 None                                 
[2024-04-25 08:45:31] INFO             ❌       0 total sites found in month of April                                                          
[2024-04-25 08:45:31] INFO     ❌ ❌ ❌ ❌ 0 Reservable Campsites Matching Search Preferences                                                  
[2024-04-25 08:45:31] CAMPLY   Exiting camply 👋                                                                                               
vasso@py:~$ 

Expected behavior The Reserve California shows 44 available sites for the date/campground in question.

Console Output (with --debug)

$camply --version
camply, version 0.32.2

Additional context

< Add any other context about the problem here. >

juftin commented 3 months ago

Dang, confirmed this on my end as well. I will dig in to see what I can figure out here.

juftin commented 3 months ago

Turns out we were giving too early of a startDate for UseDirect.

Tested the following command on main vs the bugfix branch:

python -m camply \
  --debug \
  --provider ReserveCalifornia \
  campsites \
  --campground 737 \
  --start-date 2024-04-29 \
  --end-date 2024-04-30
❯ python -m camply --debug --provider ReserveCalifornia campsites --rec-area 726 --start-date 2024-04-29 --end-date 2024-04-30
[2024-04-25 18:42:42] CAMPLY   camply, the campsite finder ⛺️
[2024-04-25 18:42:42] DEBUG    Setting up camply debugging
[2024-04-25 18:42:42] DEBUG    Camply Version: 0.32.2
[2024-04-25 18:42:42] DEBUG    Python Version: 3.11.8
[2024-04-25 18:42:42] DEBUG    Platform: darwin
[2024-04-25 18:42:42] INFO     Using Camply Provider: "ReserveCalifornia"
[2024-04-25 18:42:42] INFO     1 booking nights selected for search, ranging from 2024-04-29 to 2024-04-29
[2024-04-25 18:42:42] INFO     Searching across 3 campgrounds
[2024-04-25 18:42:42] INFO         ⛰  Sunset SB (#726) - 🏕  Pines Hollow and Dunes Camp (Sites 38 – 90) (#734)
[2024-04-25 18:42:42] INFO         ⛰  Sunset SB (#726) - 🏕  Sunset Group Area (#735)
[2024-04-25 18:42:42] INFO         ⛰  Sunset SB (#726) - 🏕  South Camp (sites 1-37) (#737)
[2024-04-25 18:42:42] INFO     Searching Pines Hollow and Dunes Camp (Sites 38 – 90), Sunset SB (734) for availability: April, 2024
[2024-04-25 18:42:42] DEBUG    Starting new HTTPS connection (1): calirdr.usedirect.com:443
[2024-04-25 18:42:42] DEBUG    https://calirdr.usedirect.com:443 "POST /rdr/rdr/search/grid HTTP/1.1" 200 None
[2024-04-25 18:42:42] INFO             ⛺️      100 total sites found in month of April
[2024-04-25 18:42:42] INFO     Searching Sunset Group Area, Sunset SB (735) for availability: April, 2024
[2024-04-25 18:42:43] DEBUG    https://calirdr.usedirect.com:443 "POST /rdr/rdr/search/grid HTTP/1.1" 200 None
[2024-04-25 18:42:43] INFO             ⛺️      3 total sites found in month of April
[2024-04-25 18:42:43] INFO     Searching South Camp (sites 1-37), Sunset SB (737) for availability: April, 2024
[2024-04-25 18:42:44] DEBUG    https://calirdr.usedirect.com:443 "POST /rdr/rdr/search/grid HTTP/1.1" 200 None
[2024-04-25 18:42:44] INFO             ⛺️      37 total sites found in month of April
[2024-04-25 18:42:44] INFO     ⛺️ ⛺️ ⛺️ ⛺️ 42 Reservable Campsites Matching Search Preferences
[2024-04-25 18:42:44] INFO     📅 Mon, April 29 🏕  42 sites
[2024-04-25 18:42:44] INFO             ⛰️  Sunset SB  🏕  Pines Hollow and Dunes Camp (Sites 38 – 90): ⛺ 34 sites
[2024-04-25 18:42:44] INFO                     🔗 https://www.reservecalifornia.com/Web/Default.aspx#!park/726/734 (1 night)
[2024-04-25 18:42:44] INFO             ⛰️  Sunset SB  🏕  South Camp (sites 1-37): ⛺ 7 sites
[2024-04-25 18:42:44] INFO                     🔗 https://www.reservecalifornia.com/Web/Default.aspx#!park/726/737 (1 night)
[2024-04-25 18:42:44] INFO             ⛰️  Sunset SB  🏕  Sunset Group Area: ⛺ 1 sites
[2024-04-25 18:42:44] INFO                     🔗 https://www.reservecalifornia.com/Web/Default.aspx#!park/726/735 (1 night)
[2024-04-25 18:42:44] CAMPLY   Exiting camply 👋
juftin commented 3 months ago

:tada: This issue has been resolved in version 0.32.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: