Basic Getter Class - Gets the HTML from a specified link, extracts data using a pipeline of actions, providing events to subscribe to (complete and error).
npm install page-getter
var PageGetter = require('./models/PageGetter');
var actions = [require('./actions/getTitle')]; /
var link = 'http://alfresco.com';
//Factory function - create a PageGetter object with a given link and an array of actions to be carried out
var getter = PageGetter.create('http://www.richardgaunt.com', [require('./actions/getTitle')]);
//Attach listener and callback to completed event
getter.on('complete', function (data) {
console.log('callback called', data.result);
});
//kick off process
getter.start();