AWS Lambda Slack Web Scraper
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
conf/config.jsonand add your Slack Webhook URL
- Create a Lambda function (call it
npm run deploy- Thats it! Your code is now on AWS Lambda.
Customising the code
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.