Feat: Continuous background product scraping service.

This commit is contained in:
2026-03-09 08:40:44 +00:00
parent 752bb52e02
commit fd9d0cf874
14 changed files with 1810 additions and 1005 deletions

View File

@@ -0,0 +1,33 @@
[Unit]
Description=TCG Sole Trader Price Scraper
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=teddy
WorkingDirectory=/media/teddy/3_6GB-SSD-Storage/Documents/Programming/python/Yu-Gi-Oh_Card_Fetcher/product_scraping
ExecStart=/media/teddy/3_6GB-SSD-Storage/Documents/Programming/python/Yu-Gi-Oh_Card_Fetcher/env_api/bin/python3 product_scraper.py
# Email credentials — fill these in before installing
Environment=EMAIL_SENDER=bot@partsltd.co.uk
Environment=EMAIL_PASSWORD=@sJt1b5Cliu6
Environment=EMAIL_RECIPIENT=teddy@shuffleandskirmish.co.uk
# ,teddy@partsltd.co.uk,edward.middletonsmith@gmail.com
# Optional overrides (defaults shown):
Environment=SMTP_HOST=mail.partsltd.co.uk
Environment=SMTP_PORT=465
# Restart automatically if it crashes, but not if you stop it intentionally
Restart=on-failure
RestartSec=30
# Give the browser enough time to shut down cleanly on stop
TimeoutStopSec=30
# Send stdout/stderr to the journal (view with: journalctl -fu tcg-scraper)
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target