A python web scraping script crafted to automate data extraction from the HSN shopping cart. If you want to receive alerts, you can join this Telegram channel where the price of the products is checked daily. This is how the alerts channel looks like.
To use the script you need to have installed Firefox and Python. Use the package manager pip to install requirements.
pip install -r requirements.txt
This script is ready to work and store data in a MongoDB database. If you want to use the same system, you will need to install MongoDB. If you only want to display the current prices of the products, you can use NoDB script.
The command to use Python will depend on the operating system; typically, in Ubuntu, python3 is used, and in Windows, python. However, it will all depend on your Python installation on the system.
To run the script with the MongoDB database.
python3 hsn.py
To run the script without the MongoDB database.
python3 hsnNoDB.py
In the script, only two products are considered, which are the ones added to the cart, the EVOWHEY PROTEIN 2.0 2KG and the EVOCASEIN 2.0 (MICELLAR CASEIN + DIGEZYME) 2KG. If you want the script to include more products, you will need to add them to your shopping cart and insert a new product into the script.
As you can see, each product must have specific information.
To obtain these data, you will need to access the browser's developer tool (F12).
Once you have obtained the data, you simply need to insert a new product into the script.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.