Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecreatDotGov campsites search returns false positives #343

Closed
blamejoel opened this issue Apr 30, 2024 · 2 comments
Closed

RecreatDotGov campsites search returns false positives #343

blamejoel opened this issue Apr 30, 2024 · 2 comments
Assignees
Labels
bug Something isn't working triage This will looked at

Comments

@blamejoel
Copy link

Describe the bug
When searching for campsite availability, camply returns positive results for the search criteria, however when clicking on the link to recreation.gov for the respective site, the booking calendar shows "closure" for those dates.

Original Camply Command (with --debug)

camply --debug campsites --campground 232447 --start-date 2024-05-01 --end-date 2024-05-31 --equipment trailer 19 --weekends --nights 2

[2024-04-30 14:15:36] DEBUG    Setting up camply debugging
[2024-04-30 14:15:36] DEBUG    Camply Version: 0.4.9
[2024-04-30 14:15:36] DEBUG    Python Version: 3.6.8
[2024-04-30 14:15:36] DEBUG    Platform: linux
[2024-04-30 14:15:36] INFO     Limiting Search of Campgrounds to Weekend Availabilities
[2024-04-30 14:15:36] INFO     8 booking nights selected for search, ranging from 2024-05-03 to 2024-05-25
[2024-04-30 14:15:36] INFO     Searching for availabilities with 2 consecutive night stays.
[2024-04-30 14:15:36] DEBUG    Starting new HTTPS connection (1): ridb.recreation.gov:443
[2024-04-30 14:15:38] DEBUG    https://ridb.recreation.gov:443 "GET /api/v1/facilities/232447?full=True HTTP/1.1" 200 None
[2024-04-30 14:15:38] INFO     1 Matching Campgrounds Found
[2024-04-30 14:15:38] INFO     ⛰  Yosemite National Park, CA (#2991) - 🏕  Upper Pines Campground (#232447)
[2024-04-30 14:15:38] INFO     Filtering Campsites based on Equipment: trailer
[2024-04-30 14:15:38] INFO     Searching across 1 campgrounds
[2024-04-30 14:15:38] DEBUG    Starting new HTTPS connection (1): www.recreation.gov:443
[2024-04-30 14:15:38] DEBUG    https://www.recreation.gov:443 "GET /api/search/campsites?start=0&size=1000&fq=asset_id%3A232447&include_non_site_specific_campsites=True HTTP/1.1" 200 None
[2024-04-30 14:15:39] INFO     Metadata fetched for 237 campsites
[2024-04-30 14:15:39] INFO     Searching Upper Pines Campground, Yosemite National Park, CA (232447) for availability: May, 2024
[2024-04-30 14:15:39] DEBUG    Starting new HTTPS connection (1): www.recreation.gov:443
[2024-04-30 14:15:39] DEBUG    https://www.recreation.gov:443 "GET /api/camps/availability/campground/232447/month?start_date=2024-05-01T00%3A00%3A00.000Z HTTP/1.1" 200 None
[2024-04-30 14:15:39] INFO             ⛺️      397 total sites found in month of May
[2024-04-30 14:15:41] INFO     ⛺️ ⛺️ ⛺️ ⛺️ 18 Reservable Campsites Matching Search Preferences
[2024-04-30 14:15:41] INFO     📅 Fri, May 03 🏕  5 sites
[2024-04-30 14:15:41] INFO             ⛰️  Yosemite National Park, CA  🏕  Upper Pines Campground: ⛺ 5 sites
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/104 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/139 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/285 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/92 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/94 (2 nights)
[2024-04-30 14:15:41] INFO     📅 Fri, May 10 🏕  4 sites
[2024-04-30 14:15:41] INFO             ⛰️  Yosemite National Park, CA  🏕  Upper Pines Campground: ⛺ 4 sites
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/104 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/139 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/92 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/94 (2 nights)
[2024-04-30 14:15:41] INFO     📅 Fri, May 17 🏕  5 sites
[2024-04-30 14:15:41] INFO             ⛰️  Yosemite National Park, CA  🏕  Upper Pines Campground: ⛺ 5 sites
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/104 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/139 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/285 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/92 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/94 (2 nights)
[2024-04-30 14:15:41] INFO     📅 Fri, May 24 🏕  4 sites
[2024-04-30 14:15:41] INFO             ⛰️  Yosemite National Park, CA  🏕  Upper Pines Campground: ⛺ 4 sites
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/104 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/139 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/92 (2 nights)
[2024-04-30 14:15:41] INFO                     🔗 https://www.recreation.gov/camping/campsites/94 (2 nights)
[2024-04-30 14:15:41] CAMPLY   Exiting camply 👋

Additional context

< Add any other context about the problem here. >

@blamejoel blamejoel added the bug Something isn't working label Apr 30, 2024
@github-actions github-actions bot added the triage This will looked at label Apr 30, 2024
@blamejoel
Copy link
Author

Seems like this can be remediated by adding "Closed" to api_config.py CAMPSITE_UNAVAILABLE_STRINGS

CAMPSITE_UNAVAILABLE_STRINGS: list = [

@juftin
Copy link
Owner

juftin commented Apr 30, 2024

Hey @blamejoel, I can see that you're using Python 3.6 and camply 0.4.9 - unfortunately camply (currently on 0.32.5) only supports the currently supported versions of Python (3.8 - 3.12) so the bug you're reporting was fixed some time ago. You'll need to run an upgraded version of camply / Python to resolve your issue.

Details

camply --debug campsites --campground 232447 --start-date 2024-05-01 --end-date 2024-05-31 --equipment trailer 19 --weekends --nights 2
[2024-04-30 15:40:55] CAMPLY   camply, the campsite finder ⛺️
[2024-04-30 15:40:55] DEBUG    Setting up camply debugging
[2024-04-30 15:40:55] DEBUG    Camply Version: 0.32.2
[2024-04-30 15:40:55] DEBUG    Python Version: 3.11.8
[2024-04-30 15:40:55] DEBUG    Platform: darwin
[2024-04-30 15:40:55] INFO     Using Camply Provider: "RecreationDotGov"
[2024-04-30 15:40:55] INFO     8 booking nights selected for search, ranging from 2024-05-03 to 2024-05-25
[2024-04-30 15:40:55] INFO     Searching for booking nights on Friday and Saturday
[2024-04-30 15:40:55] INFO     Searching for availabilities with 2 consecutive night stays.
[2024-04-30 15:40:55] DEBUG    Starting new HTTPS connection (1): ridb.recreation.gov:443
[2024-04-30 15:40:57] DEBUG    https://ridb.recreation.gov:443 "GET /api/v1/facilities/232447?full=True HTTP/1.1" 200 11920
[2024-04-30 15:40:57] INFO     1 Matching Campgrounds Found
[2024-04-30 15:40:57] INFO     ⛰  Yosemite National Park, CA (#2991) - 🏕  Upper Pines Campground (#232447)
[2024-04-30 15:40:57] INFO     Filtering Campsites based on Equipment: trailer
[2024-04-30 15:40:57] INFO     Searching across 1 campgrounds
[2024-04-30 15:40:57] DEBUG    Starting new HTTPS connection (1): www.recreation.gov:443
[2024-04-30 15:40:57] DEBUG    https://www.recreation.gov:443 "GET /api/search/campsites?start=0&size=1000&fq=asset_id%3A232447&include_non_site_specific_campsites=True HTTP/1.1" 200 None
[2024-04-30 15:40:57] INFO     Metadata fetched for 237 campsites
[2024-04-30 15:40:57] INFO     Searching Upper Pines Campground, Yosemite National Park, CA (232447) for availability: May, 2024
[2024-04-30 15:40:57] DEBUG    Starting new HTTPS connection (1): www.recreation.gov:443
[2024-04-30 15:40:57] DEBUG    https://www.recreation.gov:443 "GET /api/camps/availability/campground/232447/month?start_date=2024-05-01T00%3A00%3A00.000Z HTTP/1.1" 200 None
[2024-04-30 15:40:57] INFO             ❌       0 total sites found in month of May
[2024-04-30 15:40:57] INFO     ❌ ❌ ❌ ❌ 0 Reservable Campsites Matching Search Preferences
[2024-04-30 15:40:57] CAMPLY   Exiting camply 👋

@juftin juftin closed this as completed Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This will looked at
Projects
None yet
Development

No branches or pull requests

2 participants