Script to receive an email when a product/products have stock
If you want to avoid install node and so on, follow these steps:
- Modify the config.json with your products and your email configuration
- Run
docker build -t decathlonscript .
and THAT'S ALL.
- Make sure you have node installed
node --version
- Run
npm install
-
Modify the config.json with your products and your email configuration
-
Run and wait
node index
Try first with a product with stock, and test that you receive the email with the product link.
- Go to the desired product decathlon page. Example: https://www.decathlon.es/es/p/mancuerna-hexagonal-hex-dumbbell-cross-training-musculacion-15-kg-negro/_/R-p-182851?mc=8399333&c=NEGRO
- Click the right mouse button and click on "Inspect"
- Click on "console" tab and write in the blue arrow:
window.tc_vars.product_id_super_model
A red number will be displayed, this number is the productId! - Now write:
window.tc_vars.product_id_article[0]
This number is the catalogRefIds
I tried first with my gmail address, but Google has a feature that blocks this action. For that reason I used an outlook email.