📜  python 获取 html 信息 - Python 代码示例

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

代码示例1
from bs4 import BeautifulSoup

my_HTML = #Some HTML file (could be a website, you can use urllib for that)

soup = BeautifulSoup(my_HTML, 'html.parser')

print(soup.prettify())