- Product Availability Check
- Story 1 - Two Keyboards
- Terms used in the table
- Availability
- Product name
- URL
- Timestamp
- How does it work
- Connection to server
- Accessing URLs
- Emailing results
- For the program to work correctly
- Requirements
- Configuration
- Contributors
- Usage
- How does it work?
- Support
- License
A python script for web scraping to check if a product exists on a website and create a HTML table with 4 columns: Availability, Product Name, URL, and Timestamp.
I want to purchase a new keyboard and I have to choose between 2 models, but one of them is out of stock. Instead of manually checking whether the product is in stock or not, I can use the Supply_Status_Checker program.
See in the attached video how I did it, step by step.
- Availability: If the product from the urls.txt is in stock or not;
- Product name: Extracted from the URL;
- URL: Extracted from urls.txt;
- Timestamp: The moment when the check was performed;
- Using your email and password, the program connects to the selected server in order to send emails to the recipient;
- In the "to" field (recipient), you need to add either your own email or the email where you want to receive the output;
- After running the program, if everything goes according to plan (see below);
- The program will access each link mentioned in the urls.txt file;
- After accessing each link, you should receive an HTML table via email to the recipient mentioned in the "to" field, containing the columns availability, product name, url, and timestamp;
- The script will generate a HTML table with 4 columns: Availability, Product Name, URL, and Timestamp;
- Ensure that you have all the requirements.txt installed. ( pip install -r requirements.txt )
- Make sure that you have selected the correct server in credentials.py by adding your email and password.
- Make sure you have internet connection when running the program.
Python 3.6 or later Required packages listed in requirements.txt To install the required packages, run the following command in your terminal:
pip install -r requirements.txt
The script requires user to add email credentials in credentials.py file.
- password
- recipient email
- server preference
Thanks go to these wonderful people:
Alexandru Becher |
Diana-Maria Iercosan |
To run the script, use the following command in your terminal:
python main.py
For any questions or support, please contact me via https://axbecher.com/contact/
This project is licensed under the MIT License.