Python BeautifulSoup库 致命错误!!!
Python BeautifulSoup库 致命错误!!!
不多BB,今天工作需要看了下python的 BeautifulSoup库。大致功能是想读取一个html文件。并修改其中的一些内容。方式也很简单。大致伪代码:
with open("test.html", encoding="utf-8") as f:
html_str = f.read()
html_soup = BeautifulSoup(html_str, "html.parser")
html_soup.body.div.decom
原创
2021-03-26 14:50:06 ·
392 阅读 ·
0 评论