使用BeautifulSoup从html表中获取值

问题描述 投票:0回答:1

我正在尝试使用bs4从html表中提取值,但是表的结构为:]

<td class="celda400" vAlign="center" align="right" width="100" bgColor="#DFEDFF" style="color:Black">
575,42
</td>

我要输入的值是575,42,但是它没有id或bs4要提取的其他标识符。

我怎么称呼这个值?或根据什么ID?谢谢!

python beautifulsoup html-parsing
1个回答
0
投票

您可以使用任何属性来提取。例如,要使用class =“ celda400”属性

© www.soinside.com 2019 - 2024. All rights reserved.