【发布时间】:2017-10-08 19:36:11
【问题描述】:
这是 HTML 的样子:
<td>
<font face="Arial, sans-serif" size="-1">
<b>Home Phone: </b>507-383-1070<br>
<b>Cell Phone: </b>507-383-1070<br>
<b>E-Mail: </b><a href=mailto:macehrhardt@gmail.com>macehrhardt@gmail.com</a><br>
</font>
</td>
我只想抓取Home Phone 和Cell Phone 的数据,例如。 507-383-1070。你能帮我看看我将如何使用 BeautifulSoup 来解决这个问题。我尝试了多种方法,但没有找到任何方法。
【问题讨论】:
-
请向我们展示您已经尝试过的内容。
-
@sn3jd3r 在代码中我刚刚得到了
<b>标签之间的数据,而不是数字 -
提示:使用正则表达式
标签: python beautifulsoup