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

GoingToCamp midnrreservations.com ConnectionError #309

Open
wyatt-p opened this issue Jan 6, 2024 · 3 comments
Open

GoingToCamp midnrreservations.com ConnectionError #309

wyatt-p opened this issue Jan 6, 2024 · 3 comments
Assignees
Labels
bug Something isn't working triage This will looked at

Comments

@wyatt-p
Copy link

wyatt-p commented Jan 6, 2024

Describe the bug

Seems to be a connection error when trying to use the GoingToCamp provider, and trying to search campsites using rec area 17 (midnrreservations.com). It does not list anything, just throws a connection error as summarized below.

Original Camply Command (with --debug)

camply --debug campgrounds --provider goingtocamp --rec-area 17        
camply --debug campgrounds --provider goingtocamp --rec-area 17        
[2024-01-06 09:41:00] CAMPLY   camply, the campsite finder ⛺️                                                                                                                                                      
[2024-01-06 09:41:00] DEBUG    Setting up camply debugging                                                                                                                                                         
[2024-01-06 09:41:00] DEBUG    Camply Version: 0.31.1                                                                                                                                                              
[2024-01-06 09:41:00] DEBUG    Python Version: 3.10.12                                                                                                                                                             
[2024-01-06 09:41:00] DEBUG    Platform: linux                                                                                                                                                                     
[2024-01-06 09:41:00] INFO     Using Camply Provider: "GoingToCamp"                                                                                                                                                
[2024-01-06 09:41:00] INFO     Retrieving Facility Information for Recreation Area ID: `17`.                                                                                                                       
[2024-01-06 09:41:00] DEBUG    Starting new HTTPS connection (1): midnrreservations.com:443                                                                                                                        
[2024-01-06 09:41:01] DEBUG    https://midnrreservations.com:443 "GET /api/resourceLocation HTTP/1.1" 403 None                                                                                                     
[2024-01-06 09:41:01] ERROR    Receiving bad data from GoingToCamp API: status_code: 403: <html><head><title>midnrreservations.com</title><style>#cmsg{animation: A 1.5s;}@keyframes                               
                               A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}</style></head><body style="margin:0"><p id="cmsg">Please enable JS and disable any ad blocker</p><script data-cfasync="false">var  
                               dd={'rt':'c','cid':'AHrlqAAAAAMAPvUZ_eJNvUAArRLrqQ==','hsh':'568CC9CF98AB4BEB49884E066FEF42','t':'bv','s':35226,'e':'d5a32a7a721a58f934c9bb75b3ae4e2d8b8f1f30e464ea01af713a2d5f22258
                               e','host':'geo.captcha-delivery.com'}</script><script data-cfasync="false" src="https://ct.captcha-delivery.com/c.js"></script></body></html> 

Expected behavior
I would expect the appropriate rec areas to be listed for this site. I can replace the rec area ID with another valid one and it works as it should.

@wyatt-p wyatt-p added the bug Something isn't working label Jan 6, 2024
@github-actions github-actions bot added the triage This will looked at label Jan 6, 2024
@juftin
Copy link
Owner

juftin commented Jan 6, 2024

This looks like Captcha to me. If that's the case there's nothing we can do 😞 camply doesn't break Captcha, I would have to remove the RecArea entirely. I'll check closer soon.

@juftin
Copy link
Owner

juftin commented Jan 6, 2024

Yeah, this looks a case of https://midnrreservations.com implementing captcha to keep tools like camply out of their data.

Here's a similar case where another GoingToCamp recreation area (https://reservations.ontarioparks.com) also implemented captcha: #287

Most importantly, here is camply's policy on captcha:

Unfortunately, that type of feature [breaking captchas] will need to live on an unofficial fork outside of camply. If other providers implement captcha as well, they'll no longer be supported. Not only because of the user experience and maintenance burden, but because I have to respect their decision to keep bots out of their data.

Camply kind of skirts the edge on whether or not it is a tool that our providers approve of. Even though it's built in public, I have yet to hear from anyone asking me to take the package down or disconnect it from their website - so it seems like they at least tolerate it. Once we start breaking people's captchas (and the terms of service of captcha itself) that balance could shift and the future of camply for all providers might hang in the balance.

Unfortunately this means that we'll likely need to remove support for Michigan State Parks 😞

@wyatt-p
Copy link
Author

wyatt-p commented Jan 8, 2024

OK, well I appreciate you guys taking a closer look!

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