python scrapy 报错 DEBUG: Ignoring response 403
2017-06-11 11:33
239 查看
DEBUG: Ignoring response <403 http://movie.douban.com/top250>: HTTP status code is not handled or not allowed
怎么回事呢,被屏蔽了,我们来伪装一下,在settings.py里加上USER_AGENT:
解决方法:
在setting.py文件中增加USER_AGENT配置:(随便写一条就可以了)
USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36'
or
USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.54 Safari/536.5'
相关文章推荐
- 第三百四十六节,Python分布式爬虫打造搜索引擎Scrapy精讲—Requests请求和Response响应介绍
- 关于Server returned HTTP response code: 403 for URL
- 关于Python的Debug...
- debug QGIS 时需要python25_d库的问题
- SVN:Server sent unexpected return value (403 Forbidden) in response to OPTIONS
- raft-Response Analysis and Further Testing Tool(Python写的)
- Python抓取框架:Scrapy的架构
- Server sent unexpected return value (403 Forbidden) in response to OPTIONS解决方法
- Python抓取框架 Scrapy 的架构分析
- Python urllib2的使用点滴: cookie, https, put, 500/403的处理 | 半瓶墨水 - 任中方
- python 日志记录 用于debug 【copy 一位老兄的】
- VisualSVN Server issue: Server sent unexpected return value (403 Forbidden) in response to MKACTIVITY
- linux 下python 调用C++ .so如何debug c++代码
- server sent unexpected returen value 403 Forbidden in response to options
- python中的__debug__和__file__
- VisualSVN Server issue: Server sent unexpected return value (403 Forbidden) in response to MKACTIVITY
- 让 EditPlus 支持 Ruby/Python 语法高亮和 Debug[转]
- VisualSVN Server issue: Server sent unexpected return value (403 Forbidden) in response to MKACTIVITY
- HOW-TO:Debug python scripts with WinPDB
- Python抓取框架:Scrapy的架构