banool / recreation-gov-campsite-checker

Scrapes the recreation.gov website to check for campsite availabilities 🏕🏕
Apache License 2.0
324 stars 166 forks source link

Change in website? #19

Closed kelvinxu closed 4 years ago

kelvinxu commented 4 years ago

Followed the instructions but seemed to have run into the follow error. Just wondering if there was a change somewhere in the website that broke the current script! Thanks!

python camping.py --start-date 2018-07-20 --end-date 2018-07-23 --parks 232448 232450 232447 232770
Something went wrong
Traceback (most recent call last):
  File "camping.py", line 191, in <module>
    _main(parks)
  File "camping.py", line 116, in _main
    park_information = get_park_information(park_id, params)
  File "camping.py", line 56, in get_park_information
    return send_request(url, params)
  File "camping.py", line 48, in send_request
    resp.status_code, url, resp.text
RuntimeError: ('failedRequest', 'ERROR, 404 code received from https://www.recreation.gov/api/camps/availability/campground/232448: {"error":"Not Found"}\n')
banool commented 4 years ago

I'm seeing it too, I'll have a look a bit later.

Update 1: Seems like the URL structure has changed. I haven't figured out yet what the new API looks like. Any help would be appreciated.

kelvinxu commented 4 years ago

Looks like the API issues were fixed. Thank you!

banool commented 4 years ago

Yep, fixed in https://github.com/banool/recreation-gov-campsite-checker/commit/cd29a3da361a1d32024dd697d0bc0eb52f9b41a2.