谁能回答我,如何正确设置元素的outerHTML使用cheerio。我对此有意见。
示例:假设我下面有一个HTML结构
<div class="page-info">
<span>Here is an example #1</span>
</div>
<div class="page-info">
<span>Here is an example #2</span>
</div>
通过cheerio解析并添加一些操作
const cheerio = req
有没有一种方法可以基于DOM树中现有的子级来定位大型容器div?
在下面的示例中-是否可以根据blockA的子元素有一个id为targetA的深子元素的事实来隐藏blockA
<div class="blockA">
<span class="title">BlockA</span>
<div>
<p id="targetA">
Delete this whole block, please
this is a paragr