Comments (5)
I looked into it briefly. I think this will work trivially without much code change. Changes needed are:
- Add a user agent that looks like a real browser. The reservation site is serving up a captcha instead of the necessary JSON results. I used the agent served by my browser (firefox), and it allowed my
curl
request with correct results. - A
RecreationArea
entry with their domain (midnrreservations.com
) needs to be added to the recreation area list: https://github.com/juftin/camply/pull/170/files#diff-27cb2d1da317d1840aeb797e9a89748b2fd5bf43e193de78b9821216b342825dR24
From my original post:
Other Going to Camp providers may be possible, but it looks like they use some sort of self-hosted solution that makes the API more difficult to work with (and sometimes blocked because javascript is not active, or an unacceptable browser UA is in use).
This is probably true for many or all recreation areas. It's possible that the self-hosted version of going to camp blocks non-standard UAs by default.
from camply.
Yep at a glance, you did step (2.) above correctly. Although (1.) still needs to be done. If you open up a separate Github issue to add Michigan add support for the as many of the remaining GoingToCamp rec areas as possible, I can get that part done relatively soon.
from camply.
What would it take to get the https://midnrreservations.com/ site working with this also? Looks like they are using the self-hosted solution of Going to Camp / Camis solution as you described.
from camply.
@SoccerCore11 Good question to which I don't know the answer. GoingToCamp support is coming in the 0.8.0
camply release and I haven't looked into adding the self-hosted versions of camply.
It takes a fair amount of effort to reverse engineer the URL structure of the API, so I don't expect to look into it in the near future. However, I do imagine it's doable.
from camply.
Does 'camply/config/api_config.py' provide a list of user agents to use / try?
I created a new pull request: #176
Not a dev, so I hope I'm doing this right...
from camply.
Related Issues (20)
- Add feature to ignore errors instead of stopping the tracking HOT 13
- cannot search on ReserveCalifornia HOT 7
- Notifications over MQTT? HOT 7
- Support for novascotia.goingtocamp.com HOT 4
- Olympic National Park doesn't appear as a WA Recreation area HOT 3
- Ability to specify # of people for a campsite HOT 1
- Reserve California doesn't work for me. HOT 12
- yaml search with ReserveCalifornia fails with TypeError: object of type 'NoneType' has no len()
- Support for manitoba.goingtocamp.com HOT 2
- Trouble using search yaml file with equipment option
- Support for reservations.ontarioparks.com (goingtocamp) HOT 4
- Filter campsites for goingtocamp HOT 3
- GoingToCamp Parks Canada does not identify available sites correctly HOT 12
- `POLLING_INTERVAL_MINIMUM` limit clarification HOT 4
- Generic webhook notification HOT 6
- Reserve California website availability not reflecting in Camply searching HOT 1
- campsite geolocation HOT 6
- Webhook crashes on utf-8 characters HOT 1
- Provider for site specific backcountry permits on nps.gov
- GoingToCamp midnrreservations.com ConnectionError HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camply.