V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  xu123456789  ›  全部回复第 1 页 / 共 1 页
回复总数  5
2015-11-21 09:40:36 +08:00
回复了 xu123456789 创建的主题 Python 模拟登录这个网站获取的中文信息出现乱码
@ericls 怎么使用
2015-11-21 09:38:46 +08:00
回复了 xu123456789 创建的主题 Python 模拟登录这个网站获取的中文信息出现乱码
有人能写个模拟登录 V2EX 不出乱码的代码给我吗?
2015-11-21 09:37:56 +08:00
回复了 xu123456789 创建的主题 Python 模拟登录这个网站获取的中文信息出现乱码
@meloncrashed python3 好多东西不支持
2015-11-21 09:37:35 +08:00
回复了 xu123456789 创建的主题 Python 模拟登录这个网站获取的中文信息出现乱码
@haozhang 'Content-Type': 'text/html; charset=UTF-8'
用这个解码 html.content.decode('utf-8')
报下面错误
UnicodeEncodeError: 'gbk' codec can't encode character u'\u203a' in position 15440: illegal multibyte sequence
2015-11-21 09:37:07 +08:00
回复了 xu123456789 创建的主题 Python 模拟登录这个网站获取的中文信息出现乱码
'Content-Type': 'text/html; charset=UTF-8'
用这个解码 html.content.decode('utf-8')
报下面错误
UnicodeEncodeError: 'gbk' codec can't encode character u'\u203a' in position 15440: illegal multibyte sequence
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3456 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 10:40 · PVG 18:40 · LAX 03:40 · JFK 06:40
Developed with CodeLauncher
♥ Do have faith in what you're doing.