banool/recreation-gov-campsite-checker

CloudFront

Closed this issue · 8 comments

Anyone else getting request blocked CloudFront errors?

yeah, looks like you now need to add a user agent header

@pastudan I'd greatly appreciate it if you could make a pull request with that change

Worry not, I got it working with 26d8a6c:

$ python camping.py --start-date 2018-05-22 --end-date 2019-05-24 232447 232449 232450 232448
There are no campsites available :(
❌  UPPER PINES: 0 site(s) available out of 240 site(s)
❌  NORTH PINES: 0 site(s) available out of 93 site(s)
❌  LOWER PINES: 0 site(s) available out of 75 site(s)
❌  TUOLUMNE MEADOWS: 0 site(s) available out of 21 site(s)

Yeah seems like they only release a month's block of campsites at 7am, on the 15th of every month. And when I check they are all picked up within a second or two of being released.

So, since you only run this on a cron every 5 minutes, I'm assuming people release their reservation if they can't use it? Have you actually had any luck snagging a site on other days? I've never once seen any available in my 3 years of trying :(

My other thought was to just fire a request every second or so (around 7am) to check availability, and once it finds one, have it add whichever site is available to my shopping cart, which would give me 5 minutes to go finalize the checkout on my account.

Apparently this problem is still occurring as per #3. I don't have the bandwidth to work on this right now but I'm receptive to pull requests :)

We'll track the issue here, so I closed #3.

@pastudan @000011111111 If you could continue the discussion about reservations in a new issue? It's a problem orthogonal to this one.

I have had no user reports of this since March last year so I'm going to close it out.