Remote web content crawler done right.
Sometimes I want to grab some nice images from a url like http://bbs.005.tv/thread-492392-1-1.html , so I made this little program to combine node-fetch
and cheerio
to make my attempt fulfilled. And it uses nightmare
to handle SPAs.
$ npm install --save aimer
const aimer = require('aimer') aimer('http://some-url.com/a/b/c') .then($ => { $('img.nice-images').each(function () { const url = $(this).attr('src') console.log(url) }) }) // or even single page website! const nightmare = require('aimer/nightmare') nightmare('http://some-url.com/#!/list') .then($ => { // your code goes here })
cheerio options. Except decodeEntities
is false
by default here.
Usenightmare to retrieve html from url, this is good for handling SPA website.
cheerio options. Except decodeEntities
is false
by default here.
nightmare options.
MIT ©EGOIST