nodejs中的爬虫库:cheerio、Superagent、Crawl-pet等
一、初体验
cheerio主要是进行页面dom解析,语法接近jquery
const cheerio = require('cheerio'),
const $ = cheerio.load('<h2 class = "title">Hello world</h2>');
$('h2.title').text('Hello there!');
$('h2').addClass('welcome');
$.html();
//=> <h2 class = "title welcome">Hello there!</h2>