📌  相关文章
📜  如何使用 beautifulsoup 从网站中提取数据 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:22.297000             🧑  作者: Mango

代码示例2
from bs4 import BeautifulSoup
soup = BeautifulSoup(html_doc, 'html.parser')

print(soup.prettify())
# 
#  
#   
#    The Dormouse's story
#   
#  
#  
#   

# # The Dormouse's story # #

#

# Once upon a time there were three little sisters; and their names were # # Elsie # # , # # Lacie # # and # # Tillie # # ; and they lived at the bottom of a well. #

#

# ... #

# #