Skip to content

Scrape Data

Scrape Data #193

Workflow file for this run

name: Scrape Data
on:
schedule:
- cron: '0 10 * * *' # Every day at 10am UTC
workflow_dispatch:
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: 'main'
token: ${{ secrets.PAT }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install -r _scripts/requirements.txt
- run: pip install git+https://github.com/WAVDL/storygraph-api
- name: Run Scrapers
run: python _scripts/PullUpdates.py _data/ranks.json _data/books.json _data/links.json ${{ secrets.STORY_GRAPH_COOKIE }} ${{ secrets.PINBOARD_KEY }}
- name: Commit Data
run: |
git config --global user.name 'wavdl'
git config --global user.email 'billy@wavdl.blog'
git add _data/ranks.json
git add _data/books.json
git add _data/links.json
git commit -m "Automated Data Update"
git push