Coder Social home page Coder Social logo

dhimmel / hackjohn Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 18.0 64 KB

Bot to monitor for southbound permit spaces on the John Muir Trail

Home Page: https://hive.blog/@dhimmel/introducing-the-hackjohn-bot-for-southbound-john-muir-trail-permits

License: MIT License

Python 100.00%
hiking yosemite donahue-pass john-muir-trail bot permits jmt python

hackjohn's Issues

Permit application moved to recreation.gov

Looks like permits have moved to recreation.gov this year so hackjohn is broken again. I assume the permit application process has otherwise remained the same, but I haven't looked into it in detail. Either way, it could be a substantial amount of work to update hackjohn.

I don't have the time to work on this at the moment but it's possible I will later this spring or summer. If anyone else wants to take a stab at it I can offer some help as needed.

New Yosemite Planning Your Wilderness Permit page prevents automated access to the trailhead report

Currently, the trailhead report webpage that hackjohn uses at https://www.nps.gov/yose/planyourvisit/fulltrailheads.htm shows the following:

image

The "improved version" at https://yosemite.org/planning-your-wilderness-permit/ places the trailhead report behind a capcha:

image

So it looks like users will no longer be able to perform automated checks of the trailhead report, like Hackjohn used to enable. This is a bit of a bummer, but perhaps Hackjohn was a victim of its own success!

If anyone is aware of a workaround or finds the trailhead available from a public API endpoint, let us know below and Hackjohn might be able to resurrect itself.

ValueError "Date" is not in list

I'm a beginner at python, but I did manage to get this bot to work earlier today, 3 pm PDT. A little later (7 pm PDT), I tried to run it again and it gave me the ValueError "Date" is not in list message. I checked the trailhead website and the table looks really different than it did earlier today. I think Yosemite NP changed the format of the table at some point this afternoon, and that's what is messing up the code.

Running hackjohn from cron

Hi there--very cool project. I can run hackjohn from the shell, but not from cron--when it runs from cron it does not seem to be able to successfully load the anaconda environment. Do you mind sharing more details on how you managed to configure it with cron?
I have created a shell script to be executed by cron. I have tried every possible permutation of:
cd /Users/friedman/hackjohn
conda activate hackjohn or source /anaconda2/bin/activate hackjohn
/anaconda2/envs/hackjohn/bin/python hackjohn.py or python hackjohn.py or
hackjohn.py (with the proper shebang line at the top)

Could you share insight about how you got cron to properly activate the anaconda environment and use the proper version of python? thanks so much:)

Use GitHub Actions for notifications

It should be possible to do everything via GitHub actions, so users don't have to run anything locally.

Instead, a user would fork dhimmel/hackjohn and edit the parameters. Then scheduled cron actions would take care of the rest.

Confusion about how to read the reservation vacancy table

Hi - Sorry for posting my off topic question in the other issue. I've spent a ton of time in the high sierra but never really bothered with the Yosemite system since it always confused me.

I was wondering if you could help me understand how to read the table of vacancies. Mainly I was wondering, are dates other than the 2-week-out date subject to lottery? For instance, if I wanted to submit a reservation for August 13 (1 available) or September 5 (4 available), are these bookable today (Aug 4)?

Apologies if my question is confusing. I'm trying to determine if it's worth it to work on a scraper to bypass the captcha or if it's the chances of getting any sort of permit through this system is low.

image

Empty DataFrame

Any reason I would be getting this message?

Empty DataFrame
Columns: [Date, Trailhead, Spaces]
Index: []

IS this still working?

I am getting lots of error. I solved some of them but their is no Trailhead column in the df.

Including report date / avoiding repeated notification

Is there a way to include the report date in the message that gets sent out? It looks like the report isn't updated very consistently and I'd like to include the report date in the message. There doesn't seem to be a specific css class associated with the report date span but it is the only occurrence of the "Report Date:" string in the file. Python isn't my strong suit or I'd add a PR for this feature.

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.