html = """
<div class="bd">
<p class>
hello
thank
</p>
"""
bs = BeautifulSoup(html, 'html.parser')
p = bs.find('p').string
print(p)
输出结果是 None
为什么呢?
是我的锅,
被它吞掉了。。
html = """
<div class="bd">
<p class>
hello
thank
</p>
"""
bs = BeautifulSoup(html, 'html.parser')
p = bs.find('p').string
print(p)
输出结果是 None
为什么呢?
是我的锅,
被它吞掉了。。
2 回答4.1k 阅读✓ 已解决
2 回答797 阅读✓ 已解决
1 回答4.1k 阅读✓ 已解决
2 回答2.1k 阅读✓ 已解决
3 回答781 阅读✓ 已解决
4 回答2.5k 阅读
3 回答801 阅读✓ 已解决
可以获取hello thank啊,没有None