Giter VIP home page Giter VIP logo

Comments (5)

acaloiaro avatar acaloiaro commented on July 17, 2024 1

I looked into it briefly. I think this will work trivially without much code change. Changes needed are:

  1. 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.
  2. 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.

acaloiaro avatar acaloiaro commented on July 17, 2024 1

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.

SoccerCore11 avatar SoccerCore11 commented on July 17, 2024

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.

acaloiaro avatar acaloiaro commented on July 17, 2024

@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.

SoccerCore11 avatar SoccerCore11 commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.