This is a demo beginners project for ZuriHac 2016. It watches a certain webpage for links with keywords (e.g. search http://news.ycombinator.com for "Haskell"). When such a link is found, it sends you a slack message. See the codelab for more details.
The code is organised in three modules.
WebWatch.Links
: Scrapes a web page and pulls out links matching given keywordsWebWatch.Slack
: Performs a HTTP POST request to a Slack webhookMain.hs
: Main module, reads the configuration file and then runs the scraper/chatbot at a configurable interval
The implementation uses the following libraries:
http-client
for downloading a web page and sending a POSTtagsoup
for parsing the web page and getting out the linksnetwork-uri
to deal with relative/absolute URIsconfigurator
to read the configuration file