mac - python Jupyter notebook中文乱
2017-11-21 本文已影响1708人
一只奔跑的乌龟
第一次写简答你的爬虫,使用Jupyter notebook 编写代码,抓取的内容中文出现乱码,可以肯定是编码格式不匹配造成,倒腾了半小时...... 加上#coding=utf-8 不管用
解决方法:
如下图:

结果不是utf-8 所以乱码

第一次写简答你的爬虫,使用Jupyter notebook 编写代码,抓取的内容中文出现乱码,可以肯定是编码格式不匹配造成,倒腾了半小时...... 加上#coding=utf-8 不管用
解决方法:
如下图:
结果不是utf-8 所以乱码