Skip to content

Crawl Data

Crawl Data #1003

Workflow file for this run

name: Crawl Data
on:
schedule:
- cron: "0 2 * * *"
workflow_dispatch:
push: { branches: ["master", "main"] }
jobs:
crawl:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: pip install requests
- name: Crawl data and update JSON
run: |
python CrawlData/crawl_data.py
env:
DATA_JSON_PATH: CrawlData/data.json
- name: commit
run: |
git config --global user.email 3504852205@qq.com
git config --global user.name pwxiao
git add .
git commit -m "update" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}