npm.io
0.0.1-a10 • Published 8 years ago

sscraper

Licence
ISC
Version
0.0.1-a10
Deps
3
Vulns
0
Weekly
0

SScraper

This project connects phantomjs, cheerio and sqlite for fast scraping.

Basic usage

const scraper = require('sscraper')

scraper.connect('http://google.com', function($){
  // here you have jquery object
  console.log( $('a').text() );
})

Usage with save to sqlite

const scraper = require('sscraper')

scraper.create_db( 'news', {
  title: { unique: true }
})

scraper.connect( 'http://wp.pl', function( $ ) {

  $( 'li[data-type=teaser]' ).each( function(){
    scraper.insert_db('news', $(this).text() )
  })

})
Documentation