📌  相关文章
📜  beautifulsoup 从网站获取数据 - Python 代码示例

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

代码示例1
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. #

#

# ... #

# #