Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

爬下来之后显示的是乱码,这该怎么解决? #1

Closed
bossming opened this issue Dec 23, 2016 · 3 comments
Closed

爬下来之后显示的是乱码,这该怎么解决? #1

bossming opened this issue Dec 23, 2016 · 3 comments

Comments

@bossming
Copy link

就像下面这样

用户信息
用户昵称:Ԭ��?
用户id�?1320135280
微博数:2636
关注数:388
粉丝数:25207674

原创微博内容�?
1:�����������ݽ���[Ү]
点赞数:88904 转发数:10687 评论数:5493

2:��׽��ֻ����[����]
点赞数:93028 转发数:10276 评论数:4415

3:��ˮ������ζ��ʲô��
点赞数:80441 转发数:11059 评论数:10604

4:�����⼸�뼦����
点赞数:108673 转发数:11534 评论数:5617

@arctanx
Copy link

arctanx commented Dec 25, 2016

中文编码的问题,修改一下encode类型,encode(sys.stdout.encoding)

@zxu7
Copy link

zxu7 commented Mar 15, 2017

我这倒是要string.decode('gbk')才能运作

@lanceyuu
Copy link

把所有encode('gbk') 的gbk都改成utf-8就好了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants