python 爬虫库 beautifulsoup4_Python爬虫之BeautifulSoup4
生活随笔
收集整理的這篇文章主要介紹了
python 爬虫库 beautifulsoup4_Python爬虫之BeautifulSoup4
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
The Dormouse's story
Once upon a time there were three little sisters; and their names were
,
Lacie and
Tillie;
and they lived at the bottom of a well.
...
"""
# 創(chuàng)建 Beautiful Soup 對(duì)象,指定lxml解析器
soup = BeautifulSoup(html, "lxml")
# 格式化輸出 soup 對(duì)象的內(nèi)容
print(soup.prettify())
運(yùn)行結(jié)果
The Dormouse's story
The Dormouse's story
Once upon a time there were three little sisters; and their names were
,
Lacie
and
Tillie
;
and they lived at the bottom of a well.
...
總結(jié)
以上是生活随笔為你收集整理的python 爬虫库 beautifulsoup4_Python爬虫之BeautifulSoup4的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 抖音电商回应去年GMV达1.41万亿元传
- 下一篇: python手势识别_Python|使用