The script checks availability of delivery slots at https://www.kosik.cz/ and sends an email when a free slot is present.
The setup below is for Windows 10.
- Find used Chrome version -
Help > About Google Chrome
. - Install Selenium chrome driver from https://chromedriver.chromium.org/downloads.
- Download and install Anaconda from https://www.anaconda.com/distribution/#download-section.
- Run Anaconda Prompt application
- Install pip - run
conda install -c anaconda pip
. - Navigate with
cd
to the directory with repository and install packages - runpip install -r requirements.txt
.
- Install pip - run
- Create and setup a gmail email account used for sending emails. See Option 1 at https://realpython.com/python-send-email/#option-1-setting-up-a-gmail-account-for-development.
- Update configuration in
kosik_watchdog.py
. Change variablesPATH_TO_CHROMEWEBDRIVER
,ADDRESSES
,WATCHDOG_EMAIL
andWATCHDOG_PASSWORD
.
- Change paths in
run_script.bat
- Add chromedriver to run at startup. See https://www.howtogeek.com/228467/how-to-make-a-program-run-at-startup-on-any-computer/.
- Setup windows Task scheduler to run
run_script.bat
periodically. See https://stackoverflow.com/a/4250516/11238203.- In General set Run whether user is logged on or not
- Triggers - At system startup, repeat every 15 minutes. Please, be reasonable with the periodic execution and do not abuse the system.