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

@@ -13,4 +13,34 @@ xlsxwriter
# selenium
# undetected_chromedriver
playwright
aioconsole
aioconsole
""" Call
EMAIL_SENDER=bot@partsltd.co.uk \
EMAIL_PASSWORD=@sJt1b5Cliu6 \
EMAIL_RECIPIENT=teddy@shuffleandskirmish.co.uk \
python3 product_scraper.py
One-time setup (edit credentials first):
# 1. Fill in your email details in the service file
nano product_scraping/tcg-scraper.service
# 2. Copy to systemd and enable
sudo cp product_scraping/tcg-scraper.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable tcg-scraper # auto-start on boot
sudo systemctl start tcg-scraper
Day-to-day controls:
sudo systemctl stop tcg-scraper # stop immediately
sudo systemctl start tcg-scraper # start again
sudo systemctl restart tcg-scraper # restart (e.g. after editing the .py)
sudo systemctl status tcg-scraper # is it running? last exit code?
journalctl -fu tcg-scraper # live log tail (Ctrl+C to exit)
journalctl -u tcg-scraper --since today # today's log
"""