An AWS Lambda function to scrape a website and send information gleamed to slack
Switch branches/tags
Nothing to show
Clone or download
Latest commit 5826c5a Sep 13, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
conf Added sample config and README.md Jul 25, 2017
docs Moved image Jul 25, 2017
src Updated URL Sep 13, 2017
.gitignore First fully working version Jul 25, 2017
.nvmrc Added nvmrc Jul 24, 2017
.travis.yml Added Travis File Aug 22, 2017
README.md Added both files which need to be modified to README Aug 22, 2017
index.js Cleaned up code, moved slack code to it's own class Aug 22, 2017
logo.png Added a logo Aug 21, 2017
package.json First fully working version Jul 25, 2017

README.md

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.