A little web scraper that sends a text alert when fabric is back in stock
An AWS Lambda function is configured to run the scraper using the Serverless Framework. Run the project locally with serverless invoke local --function productIsAvailable
and deploy to AWS with serverless deploy
.
The AWS Lambda function is triggered daily via AWS Event Bridge. Credentials are configured as Lambda env variables.
Axios is used to make a request to the website, Big Duck Canvas, and Cheerio looks for the "Add to Cart" button on the product page.
If the Add to Cart button is found, Twilio will send a text message alert.