会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
extendswind
博客园
首页
新随笔
联系
管理
2017年2月21日
问题:python3 使用beautifulSoup时,出错UnicodeDecodeError: 'gbk' codec …….
摘要: 想将html文件转为纯文本,用Python3调用beautifulSoup 超简单的代码一直出错,用于打开本地文件: from bs4 import BeautifulSoupfile = open('index.html')soup = BeautifulSoup(file,'lxml')print (soup) 出现下面的错误 UnicodeDecodeError : ‘gbk’...
阅读全文
posted @ 2017-02-21 21:18 extendswind
阅读(3986)
评论(0)
推荐(1)
编辑
公告