A simple CLI tool, what can send notification to your phone if a favorite Too Good To Go item becomes available. The script talks with the TooGoodToGo API via the tgtg-python client.
It can send notification to your phone via Pushbullet or Telegram.
Python version: 3.7+
This Project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Too Good To Go, or any of its subsidiaries or its affiliates.
Too Good To Go explicitly forbids the usege of their platform the way this tool does if you use it. In their Terms and Conditions it says: "The Consumer must not misuse the Platform (including hacking or 'scraping')."
If you use this tool you do it at your own risk. Too Good To Go may stop you from doing so by (temporarily) blocking your access and may even delete your account.
-
Clone the repository and install requirements.
git clone https://github.com/tallosim/too-good-to-go-notification.git cd too-good-to-go-notification pip install -r requirements.txt
-
Create Too Good To Go Credentials. You should receive an email from Too Good To Go. It will wait until you validate the login by clicking the link inside the email. Once you clicked the link, you will get credentials and be able to use them
python ctgtg-credtentials.py -e <YOUR_EMAIL@EXAMPLE.COM>
-
Add your credentials, API tokens and other settings to
.env
file. To get your Pushbullet token, you can follow the How do I setup pushbullet notifications? guide. To get your Telegram token, you can follow the Telegram: From BotFather to 'Hello World' guide.# Too Good To Go Credentials - JSON base64 encoded TGTG_CREDENTIALS=<base64 encoded json> # Pushbullet credentials, chat id and device id PUSHBULLET_TOKEN=<token> PUSHBULLET_CHAT_ID=<chat id> PUSHBULLET_DEVICE_ID=<device id> # Telegram credentials and chat id TELEGRAM_TOKEN=<token> TELEGRAM_CHAT_ID=<chat id>
If you want to run the script manually, you can do it with the following command:
python tgtg-notification.py
Or you can use the docker image:
docker run -d --name tgtg-notification \
-e TGTG_CREDENTIALS=<base64_encoded_json> \
-e PUSHBULLET_TOKEN=<token> \
-e PUSHBULLET_CHAT_ID=<chat_id> \
-e PUSHBULLET_DEVICE_ID=<device_id> \
-e TELEGRAM_TOKEN=<token> \
-e TELEGRAM_CHAT_ID=<chat_id> \
tallosim/tgtg-notification
In this version, by default it will only get your favorites Too Good To Go items. In the future, I would like to add an option where you can specify it.