我正在尝试使用名为“lead value”的类访问div中的值。这是第二次出现具有值为'lead value'的类的div,因此我尝试通过在出现第二个'lead value'的父级下进行子集来访问这个特定实例。你知道吗
以下是html:
<td title="College Readiness is based on the percentages of 12th graders who were tested and passed AP® exams. The maximum college readiness index value is 100.0." class="column-last column-even table-column-last table-column-even g_school_in_country_college_readiness_index_stacked cluetip">
<div>
<p><div class="lead-value">100.0</div>
所以我想使用monster类名"column-last column-even table-column-last table-column-even g_school_in_country_college_readiness_index_stacked cluetip"
来获取值“100”。你知道吗
我该如何使用BeautifulSoup?你知道吗
例如,原版示例.html文件如下:
python代码是:
相关问题 更多 >
编程相关推荐