1.0.2 • Published 8 years ago

nicescraper v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

#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