【发布时间】:2014-06-11 13:09:09
【问题描述】:
我正在抓取的页面包含这些 HTML 代码。如何使用 bs4 删除评论标签 <!-- --> 及其内容?
<div class="foo">
cat dog sheep goat
<!--
<p>NewPP limit report
Preprocessor node count: 478/300000
Post‐expand include size: 4852/2097152 bytes
Template argument size: 870/2097152 bytes
Expensive parser function count: 2/100
ExtLoops count: 6/100
</p>
-->
</div>
【问题讨论】:
-
目的是什么?您要解决的问题是什么?
标签: python html web-scraping html-parsing beautifulsoup