andrey-yantsen / boots-deal-saver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is it?

It's a simple script to automatically save all available offers for your Boots card.

How it's working?

Under the hood the script uses Selenium Webdriver and Python3. You have to provide your Boots credentials, and the script will save the offers for you. It optionally can send notifications to a specific telegram chat.

Setting up

Option 1, easiest, using docker-compose

Clone this repo locally:

git clone https://github.com/andrey-yantsen/boots-deal-saver.git

Create .env file within the folder with project, setting proper values:

LOGIN=<LOGIN>
PASSWORD=<PASSWORD>

RESTART_DELAY=3600

TELEGRAM_TOKEN=<TOKEN>
TELEGRAM_CHAT_ID=<USER_ID>

Replace <LOGIN> with your Boots username and <PASSWORD> with your password. RESTART_DELAY variable should be set to an interval in seconds between checks — in this example it's 1 hour (3600 seconds). To obtain a token for telegram you have to create a new bot using @BotFather, and to get your user_id in Telegram — just drop a message to @userinfobot.

And, finally, run everything with docker-compose up.

Option 2, less easy, using docker directly

Run docker instance with selenium:

docker run -d --name selenium-server \
           --log-opt max-size=10m \
           --log-opt max-file=3 \
           selenium/standalone-chrome 

Run docker instance with the script, replacing placeholders the save way as in 1st option:

docker run -d -e 'LOGIN=<LOGIN>' \
           -e 'PASSWORD=<PASSWORD>' \
           -e 'RESTART_DELAY=3600' \
           -e 'TELEGRAM_TOKEN=<TOKEN>' \
           -e 'TELEGRAM_CHAT_ID=<USER_ID>' \
           -e 'SELENIUM_HOST=selenium-server' \
           --log-opt max-size=10m \
           --log-opt max-file=3 \
           --name bootser --restart=on-failure virus/boots-deal-saver

Option 3, for those, who knows what they're doing

The project has pipenv files, use it wisely.

About

License:MIT License


Languages

Language:Python 93.2%Language:Dockerfile 6.8%