问题:python3 使用beautifulSoup时,出错UnicodeDecodeError: 'gbk' codec …….
想将html文件转为纯文本,用Python3调用beautifulSoup超简单的代码一直出错,用于打开本地文件: from bs4 import BeautifulSoup file = open('index.html') soup = BeautifulSoup(file,'lxml') print (soup)出现下面的错误UnicodeDecodeError...
转载
2018-07-26 13:44:11 ·
1640 阅读 ·
0 评论