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

πŸ› goingtocamp missing sites #293

Open juftin opened 11 months ago

juftin commented 11 months ago

Description

Resolves #291

This PR makes a few changes:

1) Allows for campsites to have a null minCapacity - it gets replaced with 0 now 2) No longer uses NON_GROUP_EQUIPMENT in every API request. By default, no equipment type is requested.

Has This Been Tested?

Yes - all snapshots needed to be recreated because we're passing different API params

spraot commented 6 months ago

This should be merged!

juftin commented 6 months ago

I'm not actually sure GoingToCamp is working as expected, with or without this change. For example, this command currently returns 7 sites:

camply campsites --provider GoingToCamp --campground -2147483565 --start-date 2024-05-23 --end-date 2024-05-24 --rec-area 14 --notifications silent --debug
image

However these 7 sites are all included in the Group Campsite Area, and omitting the #1-94 area which has at least 1 available. I believe there's an issue with enumerating all MapIDs / Locations to search and some areas aren't included.

yashshah commented 3 months ago

Are there any updates here? I am seeing the same when running:

❯   camply campsites \
  --provider goingtocamp \
  --rec-area 14 \
  --notifications ntfy \
  --campground -2147483565 \
  --start-date 2024-05-28 \
  --end-date 2024-05-29 \
  --polling-interval 10 \
  --search-forever --debug
[2024-05-20 22:38:27] CAMPLY   camply, the campsite finder ⛺️
[2024-05-20 22:38:27] DEBUG    Setting up camply debugging
[2024-05-20 22:38:27] DEBUG    Camply Version: 0.32.6
[2024-05-20 22:38:27] DEBUG    Python Version: 3.10.9
[2024-05-20 22:38:27] DEBUG    Platform: darwin
[2024-05-20 22:38:27] INFO     Using Camply Provider: "GoingToCamp"
[2024-05-20 22:38:27] INFO     1 booking nights selected for search, ranging from 2024-05-28 to 2024-05-28
[2024-05-20 22:38:27] INFO     Retrieving Facility Information for Recreation Area ID: `14`.
[2024-05-20 22:38:27] DEBUG    Starting new HTTPS connection (1): reservation.pc.gc.ca:443
[2024-05-20 22:38:27] DEBUG    https://reservation.pc.gc.ca:443 "GET /api/resourceLocation HTTP/1.1" 200 288380
[2024-05-20 22:38:28] DEBUG    https://reservation.pc.gc.ca:443 "GET /api/maps HTTP/1.1" 200 4227616
[2024-05-20 22:38:28] INFO     1 Matching Campgrounds Found
[2024-05-20 22:38:28] INFO     β›°  Parks Canada (#14) - πŸ•  Pacific Rim - Green Point (#-2147483565)
[2024-05-20 22:38:28] INFO     Searching for campsites every 10 minutes.
[2024-05-20 22:38:28] INFO     Notifications active via: <SilentNotifications>, <NtfyNotifications>
[2024-05-20 22:38:29] DEBUG    https://reservation.pc.gc.ca:443 "GET /api/availability/map?mapId=-2147483313&resourceLocationId=-2147483565&bookingCategoryId=0&startDate=2024-05-28&endDate=2024-05-29&isReserving=True&getDailyAvailability=False&partySize=1&numEquipment=1&equipmentCategoryId=-32768 HTTP/1.1" 200 1353
[2024-05-20 22:38:29] DEBUG    https://reservation.pc.gc.ca:443 "GET /api/attribute/filterable HTTP/1.1" 200 227602
[2024-05-20 22:38:29] DEBUG    https://reservation.pc.gc.ca:443 "GET /api/resource/details?resourceId=-2147480629 HTTP/1.1" 200 3461
[2024-05-20 22:38:29] DEBUG    https://reservation.pc.gc.ca:443 "GET /api/resource/details?resourceId=-2147480555 HTTP/1.1" 200 3463
[2024-05-20 22:38:29] DEBUG    https://reservation.pc.gc.ca:443 "GET /api/resource/details?resourceId=-2147480542 HTTP/1.1" 200 3463
[2024-05-20 22:38:29] DEBUG    https://reservation.pc.gc.ca:443 "GET /api/resource/details?resourceId=-2147480542 HTTP/1.1" 200 3463
[2024-05-20 22:38:29] INFO     ❌ ❌ ❌ ❌ 0 Reservable Campsites Matching Search Preferences

Basically it is not catching all the mapIds and doesn't list available campsites