Heim  >  Fragen und Antworten  >  Hauptteil

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 Tage vor855

Antworte allen(1)Ich werde antworten

  • 三叔

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

    1.png

    可以获取hello thank啊,没有None


    Antwort
    0
  • StornierenAntwort