Skip to content

Instantly share code, notes, and snippets.

@BLamy
Last active May 18, 2020 01:34
Show Gist options
  • Save BLamy/b6500ff212d7674737902acba05b287d to your computer and use it in GitHub Desktop.
Save BLamy/b6500ff212d7674737902acba05b287d to your computer and use it in GitHub Desktop.
Find Open Backpacking

Pick a park from

https://www.fs.usda.gov/

Navigate to the Recreation section and select that you want to do hiking then backpacking. You will be at a page that looks like this:

https://www.fs.usda.gov/activity/plumas/recreation/hiking/?recid=11182&actid=51

Pop open dev tools and run the following command from the console

[...document.querySelectorAll('#centercol li>a')].forEach(a => 
  fetch(a.href)
    .then(res => res.text())
    .then(text => text.indexOf('This area is Open') > 0)
    .then(isOpen => console.log(a.text, '-', isOpen))
)

Imgur

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment