Node.js service that periodically checks if products from online stores are in stock. Sends notifications when items come back in stock via SMS using Twilio.
- Node.js
- npm
- Google Chrome (or any Chromium-based browser)
stock-checkeruses Puppeteer to open product pages and read their contents. Although Puppeteer's bundled Chromium could be used, this will likely fail on some websites due to bot prevention mechanisms. Using a local instance of Chrome that you use for your daily browsing means that the traffic generated bystock-checkerwill be virtually indistinguishable from organic traffic.
- A Twilio account
- Clone the repository.
npm install- Copy the
data.exampledirectory and rename itdata. - In the
datadirectory, configureconfig.yml,products.ymlandrecipients.ymlas desired.- If you need to add a product from an unsupported website, have a look at
adding support for it in
src/providers.js.
- If you need to add a product from an unsupported website, have a look at
adding support for it in
npm startstock-checkerwill check the stock of your defined products every 3 to 10 minutes, and send out notification SMS messages to defined recipients when the stock status changes.- Don't delete the
data/lastStockMap.jsonfile as it is used to store the last known stock state. This prevents sending duplicate messages when a product comes back in stock.
stock-checker is provided under the terms of the MIT License. See the
LICENSE file for details.