As we know Python is a multi-purpose language and widely used for scripting. Its usage is not just limited to solve complex calculations but also to automate daily life task. Let’s say we want to track any Amazon product availability and grab the deal when the product availability changes and inform the user of availability through email. It will be a great fun to write a Python script for this.
Note: Install the required libraries (as per the code) before running the script. Also, note if the product is not available currently then no email will be sent to user. Asin Id should be provided by the user for the product he wants to keep track of.
Working of each module used:
-> requests: Used to make HTTP get and post requests
-> time: Used to find current time, wait, sleep
-> smptlib: Used to send email using Python.
Below is the implementation of above project:
Tracking.... Processing: http://www.amazon.in/dp/B077PWK5BT Only 1 left in stock. Tracking.... Processing: http://www.amazon.in/dp/B077PWK5BT Only 1 left in stock. Tracking.... Processing: http://www.amazon.in/dp/B077PWK5BT Only 1 left in stock.
Note that the program might throw an error (Critical security alert/Sign-in attempt was blocked) while sending the mail to the user, which can be handled by modifying the security setting in the mail application you are using.
- Amazon product price tracker using Python
- Project Idea | Office Room Availability
- Project Idea | Availability Aware Distributed Data Deduplication
- Project Idea | (Static Code Checker for C++)
- Python | Pandas Series.product()
- Python | Pandas dataframe.product()
- Python | Consecutive element maximum product
- Python | Pandas series.cumprod() to find Cumulative product of a Series
- Cartesian Product of any number of sets
- Reading Python File-Like Objects from C | Python
- Important differences between Python 2.x and Python 3.x with examples
- Python | Merge Python key values to list
- Python | Add Logging to Python Libraries
- Python | Add Logging to a Python Script
- Python | Set 4 (Dictionary, Keywords in Python)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.