This automated Price Tracker for amazon product is built using Python. It allows Tracking price changes and sending email alerts once the desired price is reached
- getting the link from Amazon website and locating elements: product name and price
- Fetching the element using selenium syntax See documentation
- Checking if the price meets the budget
- Sending an e-mail alert using smtplib
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
pip install -r requirements.txt
python3 scraper.py
The goal is to trigger the script (the price tracker) daily
Please refer to this documentation
Open your local terminal, go to the directory where your private key is stored and run the following command :
ssh -i /path/my-key-pair.pem ec2-user@my-instance-public-dns-nae
sudo yum install python37
curl -O https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py --user
cd/tmp/
wget https://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/bin/chromedriverchromedriver --version
curl https://intoli.com/install-google-chrome.sh | bash
sudo mv /usr/bin/google-chrome-stable /usr/bin/google-chrome
google-chrome --version && which google-chrome
pip3 install selenium
scp -i /path/my-key-pair.pem python_file.py ec2-user@my-instance-public-dns-nae:~
crontab -e
The syntax to run the script every day at 8 am is:
0 8 * * * python3 /path_file/file_name.py