Python 2.7 如何在beautifulsoup解析中跳过注释标记?
我正在使用beautifulsoup解析html页面。但我不知道如何解析下面的代码Python 2.7 如何在beautifulsoup解析中跳过注释标记?,python-2.7,beautifulsoup,Python 2.7,Beautifulsoup,我正在使用beautifulsoup解析html页面。但我不知道如何解析下面的代码 <div style="padding:8px 8px 15px 15px;font-size:12px;"> <h4><!--a href="/complaints/productone"-->PRODUCT ONE<!--/a--></h4> <div style="line-height:17px;">Details abo
<div style="padding:8px 8px 15px 15px;font-size:12px;">
<h4><!--a href="/complaints/productone"-->PRODUCT ONE<!--/a--></h4>
<div style="line-height:17px;">Details about product one</div>
</div>
产品一
关于产品一的详细信息
在上面的代码中,如果您看到标记包含注释标记
请帮帮我。我试过这样做,soup.find('h4')。但我也收到了评论行。请看一看