nicescraper

1.0.2 • Public • Published

nicescraper

Basic Web scraper for NodeJS (request, phantomjs & cheerio).

NPM

Example

var niceScraper = require('./index.js');
 
var script = function($){
    var result = { 
        'pageTitle': $('head title').html()
    };
 
    return result;
};
 
var scraper = new niceScraper('http:', 'www.google.com', ['/'], script, {
    stepDone: function(url, result, that, index){
        console.log('STEP DONE RESULT');
        console.log(result);
    },
    stop: function(error){
        console.log('STOP');
        console.log(error);
    }
});
 
scraper.start();

Dependencies

  • phantomjs - Scriptable Headless WebKit
  • request - Simplified HTTP request client
  • cheerio - Fast, flexible, and lean implementation of core jQuery designed specifically for the server

Readme

Keywords

none

Package Sidebar

Install

npm i nicescraper

Weekly Downloads

0

Version

1.0.2

License

ISC

Last publish

Collaborators

  • anrry