Этот jQuery, как селектор «cheerio», пытается получить комментарии от узлов комментариев на странице html.
$ - объект cheerio. Как это можно сделать? БлагодаряПолучить текст элемента комментария с помощью селектора черри
console.log($('*').contents().length); //reports back more than 1000
$('*').contents().filter(function() {
if (this.nodeType == 8) {
//the following gives null for every node found
console.log($(this).html());
//the following gives blank for every node found
console.log($(this).text());
}
});