我试图从下面的html中获取一个项目的过程
这是src
<span class="crwActualPrice">
<span style="text-decoration: inherit; white-space: nowrap;">
<span class="currencyINR">
</span>
<span class="currencyINRFallback" style="display:none">
Rs.
</span>
13,990.00
</span>
</span>
这是我试过的代码
dprice = each_result.find_all("span", class_="crwActualPrice")
for each_price in dprice:
money_str = each_price.string
print(money_str)
我想使用python soup获得money_str
中的值13990
使用
text()
获取div之外的内容这应该管用。虽然我不是100%的边缘案件由于有限的数据集
使用
soup.select
函数:印刷品:
相关问题 更多 >
编程相关推荐