Skip to content

Scrape

Scrape #1

Workflow file for this run

name: Scrape
on:
schedule:
- cron: "0 23 * * *"
workflow_dispatch:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
jobs:
scrape-latest:
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install requirements
run: pip install -r requirements.txt
- name: Run Scraper
run: python daily_scraper.py
- name: Set env vars
run: |
echo "DATE=$(python -c 'import datetime as dt; print(dt.datetime.now().date())')" >> $GITHUB_ENV
- name: Send mail
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: Daily Osaka Hotel Scrape ${{env.DATE}}
to: ${{secrets.MAIL_USERNAME}}
from: Automated Email
ignore_cert: true
secure: true
attachments: osaka_daily_hotel_data.csv