sscraper
v0.0.1-a10
Published
Simple scraper for node js (with phantom and cheerio)
Downloads
8
Readme
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() )
})
})