HTTP status code is not handled or not allowed的解决方法
来源:互联网 发布:无忧商务推广软件 编辑:程序博客网 时间:2024/06/07 10:06
/Books/>: HTTP status code is not handled or not allowed2017-11-04 17:21:38 [scrapy.spidermiddlewares.httperror] INFO: Ignoring response <403 http://www.dmoz.org/Computers/Programming/Languages/Python/Resources/>: HTTP status code is not handled or not allowed
我遇到的这个问题出现在scrapy里面,解决办法是在settings里面添加
HTTPERROR_ALLOWED_CODES = [403]#上面报的是403,就把403加入。
彩蛋:
scrapy默认是遵守爬虫准则的,即settings里面,ROBOTSTXT_OBEY = True。
比如抓取百度,在https://www.baidu.com/robots.txt里,有这样的一个规范。如果遵守,比如今日头条,是不能用scrapy爬取的。这个时候需要把ROBOTSTXT_OBEY=False.也就是不遵守它的规则。
阅读全文
0 0
- HTTP status code is not handled or not allowed的解决方法
- scrapy异常:http status code is not handled or allowed
- Scrapy中用xpath/css爬取豆瓣电影Top250:解决403HTTP status code is not handled or not allowed
- Status Code:405 Method Not Allowed
- HTTP Status 404 - Servlet action is not available 解决方法[转]
- HTTP Status 404(The requested resource is not available)的几种解决方法
- HTTP Status 404(The requested resource is not available)的几种解决方法
- HTTP Status 404(The requested resource is not available)的几种解决方法
- HTTP Status 404(The requested resource is not available)的几种解决方法
- Content is not allowed in prolog.解决方法
- nginx中HTTP/1.1 405 Method not allowed 的解决方法
- svn:E175002:Unexpected HTTP status 405'Method Not Allowed
- AWS S3 Not Allowed (Service: Amazon S3; Status Code: 405; Error Code: 405 Not Allowed; Request ID: n
- resource fork, Finder information, or similar detritus not allowed 解决方法
- DB2数据库 Operation not allowed for reason code "7" on table 原因码 "7"的解决方法
- JQuery 的 ajax 出现Origin null is not allowed by Access-Control-Allow-Origin 解决方法
- spring 加载时的Content is not allowed in prolog. 错误解决方法
- Mariadb-Host '192.168.*.*' is not allowed to connect to this MariaDB server"的解决方法
- 选最大值 最小值 平均值
- Maximal GCD
- 151. Reverse Words in a String
- 我看maven之ssm整合
- Mysql分库分表方案
- HTTP status code is not handled or not allowed的解决方法
- 算法的离线评估
- 51nod1076(边双联通分量)
- 网络常用设备及介绍
- 图论 应用篇
- python爬取豆瓣上面<战狼2>的20w影评
- 转载:Struts2+Jquery实现ajax并返回json类型数据
- Android中Shape的属性说明
- 编程初始之路