阅读背景:

Cheerio:使用分隔符从HTML中提取文本

来源:互联网 

Let's say I have the following:

假设我有以下内容:

$ = cheerio.load('<html><body><ul><li>One</li><li>Two</li></body></html>');

var t = $('html').find('*').contents().filter(function() {
  return this.type === 'text';
}).text(); 
$



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: