Skip to content

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 and send that table to your email.

License

Notifications You must be signed in to change notification settings

axbecher/Supply_Status_Checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

  1. Product Availability Check
  2. Story 1 - Two Keyboards
  3. Terms used in the table
    • Availability
    • Product name
    • URL
    • Timestamp
  4. How does it work
    • Connection to server
    • Accessing URLs
    • Emailing results
  5. For the program to work correctly
  6. Requirements
  7. Configuration
  8. Contributors
  9. Usage
  10. How does it work?
  11. Support
  12. License

Product Availability Checker

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.

Story 1 - Two Keyboards

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.

ENG - Two Keyboards - Supply Status Checker

Terms used in the table:

  • 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;

How does it work:

  • 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;

For the program to work correctly:

  • 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.

Requirements

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

Configuration

The script requires user to add email credentials in credentials.py file.

  • email
  • password
  • recipient email
  • server preference

Contributors ✨

Thanks go to these wonderful people:

Alexandru Becher
Alexandru Becher

Jeroen Engels
Diana-Maria Iercosan

Usage

To run the script, use the following command in your terminal:

python main.py

Support

For any questions or support, please contact me via https://axbecher.com/contact/

License

This project is licensed under the MIT License.