Skip to content

Commit

Permalink
First updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jlumbroso committed Aug 18, 2022
1 parent e508dc4 commit 584d45f
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 6,073 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/scrape.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ on:
- cron: "30 0-8,18-23 * * *"
- cron: "30 9-18 * * 1-2"

# TOO FREQUENT:
# - cron: "*/5 * * * *" # run every 5 minutes (https://crontab.guru/#*/5_*_*_*_*)

name: Scrape Hopewell Quarry Availability
name: Scrape Update
jobs:
update-logs:
name: Scrape Etix Availability
name: Scrape Update
runs-on: ubuntu-latest
permissions:
actions: write
Expand Down Expand Up @@ -57,15 +54,15 @@ jobs:
touch Pipfile
pipenv install --deploy --dev
- name: Scrape Etix and output logs
- name: Scrape content and output
run: |
pipenv run python ./script.py
- name: Commit generated logs 🚀
uses: EndBug/add-and-commit@v9
with:
message: "Commit updated data"
add: "./*.json"
add: "./data/*.json ./data/*.csv"
cwd: "."
force: true
default_author: github_actions
Expand Down
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ name = "pypi"
[packages]
requests = "*"
pytz = "*"
waybackpy = "*"
bs4 = "*"

[dev-packages]

Expand Down
79 changes: 59 additions & 20 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Hopewell Quarry Daily Pass Tracker
# Basic Git Scraper Template

The Hopewell Quarry is [a fantastic swimming hole in Hopewell Township, NJ](https://www.hopewellquarry.org/).

This repository tracks the sales of Daily Passes by scraping the availability from the Etix ticket sales platform, and stores it in a JSON file that can be queried.

The data is scraped in the cloud on GitHub Actions and updated every 5 minutes. If there are changes, a bot will update the JSON file in the `data` folder.
This is a template to create a git scraper:
- `script.py` should output `.json` and/or `.csv` in `data` folder
Loading

0 comments on commit 584d45f

Please sign in to comment.