-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1.26 KB
/
Copy pathpython-app.yml
File metadata and controls
49 lines (38 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Daily AutoScout24 Scraper - Automated Data Collection
name: AutoScout24 Daily Scraper
on:
schedule:
# Runs daily at 4:00 AM UTC
- cron: '0 4 * * *'
workflow_dispatch: # Manual trigger
permissions:
contents: write
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scrapper/requirements.txt
- name: Run Scraper
run: |
cd scrapper
python3 autoscout_luxembourg_scraper.py --multi-model vehicle_models.csv --scrape-all --delay 3
cp -f ./data/autoscout_data.db ../homepage/public/scrapper/data/autoscout_data.db
- name: Commit and push data
run: |
git config --local user.email "action@github.com"
git config --local user.name "AutoScout24 Scraper Bot"
git add scrapper/data/
if ! git diff --cached --quiet; then
git commit -m "🤖 Daily scraper update - $(date '+%Y-%m-%d %H:%M UTC')"
git push
else
echo "No changes to commit"
fi