This is a Python script that tracks the price of a product on Amazon and sends an email alert if the price drops below a certain threshold.
- Python 3.7 or higher
- Requests library
- Beautiful Soup 4 library
- smtplib library
- Clone the repository to your local machine:
- bash
- git clone https://github.com/yourusername/yourproject.git
- pip install requests
- pip install beautifulsoup4
- pip install secure-smtplib
Open the price_tracker.py file in a text editor and replace the following variables with your own values:
- makefile
- BUY_PRICE = 1500
- url = "https://www.amazon.in/dp/B08XM2CZQ7"
- sender_email = "youremail@gmail.com"
- sender_password = "yourpassword"
- receiver_email = "youremail@gmail.com"
- python main.py
Once the script is running, it will fetch the price of the specified product from Amazon at regular intervals. If the price drops below the specified threshold, it will send an email alert to the specified email address.