Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 1.06 KB

README.md

File metadata and controls

21 lines (14 loc) · 1.06 KB

AWS Lambda Slack Web Scraper

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:

Sample message in Slack

Getting Started

  1. Clone this repository
  2. Get the aws cli and login
  3. Copy conf/sample.json to conf/config.json and add your Slack Webhook URL
  4. Create a Lambda function (call it scraper)
  5. Run 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.