Weekly Scraping #45
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: Weekly Scraping | |
on: | |
schedule: | |
- cron: "0 0 * * 0" # Run every Sunday at midnight (UTC) | |
workflow_dispatch: | |
jobs: | |
scrape: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
pip install scrapetube==2.5.1 | |
pip install youtube-search-python==1.6.6 | |
- name: Run Python script and save results | |
run: | | |
python scripts/crawl.py | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
git add public/videos.json | |
git commit -m "Update videos.json" | |
git push |