
Python爬虫
万事皆成
这个作者很懒,什么都没留下…
展开
-
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
Python3中使用urllib.request.build_opener处理请求,输出返回数据报错:UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte原因:在请求header中设置了'Accept-Encoding': 'gzip, deflate'参考链原创 2018-01-11 10:01:24 · 3304 阅读 · 0 评论 -
phantom 输出中文乱码
解决方案: 1.phantom.outputEncoding=”gbk”; 参考链接 http://blog.youkuaiyun.com/winterto1990/article/details/49158251 https://www.cnblogs.com/wufangfang/p/5326375.html 2.运行命令时,输入 –output-ecoding=gb2312 3.运行时不做设原创 2018-01-23 11:01:45 · 1474 阅读 · 0 评论 -
Ubuntu安装phantomjs运行报错
Ubuntu安装phantomjs运行报错: QXcbConnection: Could not connect to display PhantomJS has crashed. Please read the bug reporting guide at http://phantomjs.org/bug-reporting.html and file a bug report.原创 2018-01-24 09:55:26 · 2532 阅读 · 4 评论