Skip to content

爬虫

cheerio

通过类jqueryapi操作方式处理网页数据爬取站点内容

js
const cheerio = require('cheerio')
const $ = cheerio.load('<h2 class="title">Hello world</h2>');

$('h2.title').text('Hello there!');
$('h2').addClass('welcome');

$.html();