zoukankan      html  css  js  c++  java
  • INFO: Ignoring response <503 http://www.xicidaili.com/nn>: HTTP status code is not handled or not allowed 用scrapy爬虫

    用scrapy爬取http://www.xicidaili.com/nt/1(国内ip)是启动小蜘蛛一直报错,将网址换成百度是可以进入parse。

    错误:

    2018-04-17 16:55:52 [scrapy.core.engine] DEBUG: Crawled (503) <GET http://www.xicidaili.com/nn> (referer: None)
    2018-04-17 16:55:53 [scrapy.spidermiddlewares.httperror] INFO: Ignoring response <503 http://www.xicidaili.com/nn>: HTTP status code is not handled or not allowed

    在setting中设置

    HTTPERROR_ALLOWED_CODES = [503] #忽略503页面  (不建议使用)
    HTTPERROR_ALLOWED_CODES默认: [] 忽略该列表中所有非200状态码的response。 
     
    重新启动 小蜘蛛 没问题了 但实际问题仍没解决
  • 相关阅读:
    crontab
    待重写
    待重写
    多套开发资源使用情况
    待重写
    待重写
    待重写
    docker安装es
    docker run启动时目录映射研究
    rabbitmq第二篇:使用插件实现延迟功能
  • 原文地址:https://www.cnblogs.com/dahuag/p/8868003.html
Copyright © 2011-2022 走看看