This is the bot used for the "Angebote des Tages (Schweiz)" channel. Said channel posts daily and weekly spacial offers of various swiss online retailers such as digitec.
There are not many retailers with specifically day / week deals that I know of so the list is a bit small. But these are basically all the ones the swiss population as a whole really cares about.
Retailer | Type | Time | Method |
---|---|---|---|
digitec | Daily | 00:00 | Via a graphql endpoint |
Galaxus | Daily | 00:00 | Via a graphql endpoint |
20min | Daily | 00:00 | Scraping the website |
20min | Weekly | Mo 00:00 | Scraping the website |
Brack / daydeal.ch | Daily | 09:00 | Scraping the website |
Brack / daydeal.ch | Weekly | Mo 09:00 | Scraping the website |
# Clone repo
git clone https://github.com/Nachtalb/day-deals
cd day-deals
# Install dependencies
poetry install
# Copy sample config and adjust values inside
cp config.sample.json config.json
You can get a bot token
from BotFather. The chat_id
of the
chat the deals are posted to can be retrieved by using an unofficial telegram
client such as 64gram (desktop), Plus or via another bot like
IDBot.
Just run the bot:
poetry run python day.py
To run it periodically you can easily create a cronjob:
5 * * * * /path/to/python /path/to/day-deals/day.py 2>&1 | /usr/bin/logger -t day-deals
The 2>1 | /urs/bin/logger -t day-deals
is optional. It just makes sure that
all outputs are correctly logged to the crontab logs.