Skip to content

An AWS Lambda function to scrape a website and send information gleamed to slack

Notifications You must be signed in to change notification settings

dueyfinster/lambda-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An AWS Lambda function to scrape a website and send information gleamed to slack

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published