首頁  >  問答  >  主體

python 爬虫

tml = """
<div class="bd">
<p class>
hello

thank
</p>
"""

bs = BeautifulSoup(html, 'html.parser')
p = bs.find('p').string
print(p)

输出结果是 None为什么呢?

1.png

高洛峰高洛峰2919 天前856

全部回覆(1)我來回復

  • 三叔

    三叔2016-10-22 16:12:59

    1.png

    可以获取hello thank啊,没有None


    回覆
    0
  • 取消回覆