【发布时间】:2017-02-19 11:37:12
【问题描述】:
尝试使用漂亮的汤(它是一个“标签”对象)获取这种类型的html sn-p的内容。
<span class="font5"> arrives at this calculation from the Torah’s report that the deluge (rains) began on the 17<sup>th</sup> day of the second month </span>
我试过了:
soup.contents.find_all('span')
soup.find_all('span')
soup.find_all(re.compile("font[0-9]+"))
soup.string
soup.child
而且这些似乎都不起作用。我能做什么?
【问题讨论】:
-
你是说
soup.find_all('span')什么都没找到,太多了,还是找到了一些但不包括你想要的东西? -
所有这些要么不返回任何内容,要么返回错误。
-
那么您要查找的内容不在源代码中。
标签: python beautifulsoup