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
为什么呢?
是我的锅,
被它吞掉了。。
4 回答4.4k 阅读✓ 已解决
4 回答3.8k 阅读✓ 已解决
1 回答3k 阅读✓ 已解决
3 回答2.1k 阅读✓ 已解决
1 回答4.5k 阅读✓ 已解决
1 回答3.8k 阅读✓ 已解决
1 回答2.8k 阅读✓ 已解决
可以获取hello thank啊,没有None