scrape #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: scrape | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 21 * * *' | |
jobs: | |
scrape: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out this repo | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Installed package list | |
run: apt list --installed | |
- name: Remove Chrome | |
run: sudo apt purge google-chrome-stable | |
- name: Remove default Chromium | |
run: sudo apt purge chromium-browser | |
- name: Install a new Chromium | |
run: sudo apt install -y chromium-browser | |
- name: Install all necessary packages | |
run: pip install requests beautifulsoup4 pandas webdriver-manager selenium | |
- name: Run the scraping script | |
run: cd docs/games/grand_archive_gabrary_spoilers;python scraper.py;cd ../../.. | |
- name: Auto-Commit | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
branch: main | |
file_pattern: docs/games/grand_archive_gabrary_spoilers/sets/ | |
commit_message: Update docs/games/grand_archive_gabrary_spoilers/sets/gabrary_spoilers.json |