安装依赖
npm i cheerio --save
中文文档
使用
var $ = cheerio.load(that.data);
$('script').map(function (i, el) {
if (el.attribs.src) {
that.jslist.push(el.attribs.src)
}
});
npm i cheerio --save
var $ = cheerio.load(that.data);
$('script').map(function (i, el) {
if (el.attribs.src) {
that.jslist.push(el.attribs.src)
}
});