小鱼儿丶
2018-10-08 17:33
2018-10-08 09:21:06 [scrapy.core.scraper] ERROR: Spider error processing <GET https://movie.douban.com/top250> (referer: None)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/twisted/internet/defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/home/xiaoyuer/PycharmProjects/douban/douban/spiders/douban_spider.py", line 11, in parse
print(response.text)
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 345-348: ordinal not in range(256)
在终端中可以打印出来的,不知道怎么就编码错误了
改下settings中的encoding就行了。自己犯傻了0.0
Python最火爬虫框架Scrapy入门与实践
67418 学习 · 223 问题
相似问题