【发布时间】:2019-02-08 09:46:19
【问题描述】:
import urllib.request
import bs4
url = ""
html = urllib.request.urlopen(url).read()
soup = bs4.BeautifulSoup(html, 'html.parser')
我正在尝试使用 python 3 将网站中的值 15.720 保存到变量中。目前我已将 html 保存到汤变量中。
如何搜索下面的行并将数字 15.720 保存到变量中?
<td class="myclass" rowspan="2">lor be: <strong>15.720</strong></td>
【问题讨论】:
标签: python python-3.x beautifulsoup