Scrapes a website (my workplace canteen's menu) and sends it nicely formatted to slack as a message so everyone can have easy visibility. Example of slack message:
- Clone this repository
- Get the aws cli and login
- Copy
conf/sample.json
toconf/config.json
and add your Slack Webhook URL - Create a Lambda function (call it
scraper
) - Run
npm run deploy
- Thats it! Your code is now on AWS Lambda.
All the code you need to modify is in src/scraper.js (for scraping the website) and src/slack.js (for sending the message). Just add the address of the website you wish to scrape, and pass it an object of what needs to be pulled from the page. See the scrape-it documentation for more information.