page-getter

0.3.0 • Public • Published

Page Getter

Description

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).

Installation

npm install page-getter

Example

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();

Readme

Keywords

none

Package Sidebar

Install

npm i page-getter

Weekly Downloads

3

Version

0.3.0

License

ISC

Last publish

Collaborators

  • rgaunt