【发布时间】:2021-07-21 10:19:04
【问题描述】:
const cheerio = require('cheerio');
const HTML = `<tbody>
<tr>
<th>
Team Name
</th>
<th>
Year
</th>
<th>
Wins
</th>
<th>
Losses
</th>
</tr>
</tbody>
`;
const $ = cheerio.load(HTML);
const text = $('tr').text();
console.log(text);
这里我没有收到短信。为什么?? HTML 字符串中是否有任何错误? 我无法确定问题所在。请帮忙!!!
【问题讨论】:
-
@marzelin — 它在cheerio@0.22 中有效,但在cheerio@1.0.0 中无效
标签: javascript node.js web-scraping cheerio