【发布时间】:2022-06-14 09:08:31
【问题描述】:
这里是 HTML 代码:
<h4 class="page-header">
" (111) Senior "
<small>
<font class="small">
<i class="glyphicon glyphicon-road">
::before
</i>
" Street 8.9 "
<a href="htttp://" target="_blank">(master refrence)</a>
</font>
</small>
</h4>
我的 Python 代码:
print("new adress: " + driver.find_element(By.CLASS_NAME, "small").text)
我的结果:
new address: (Verification data, according to school updates)
我想要这样的结果:
new address: Street 8.9
有人对我的问题提出建议吗?
【问题讨论】:
标签: python-3.x selenium selenium-webdriver