Scrapy常见异常 - littleboy12580/learning_python GitHub Wiki

  • DropItem:该异常由item pipeline抛出,用于停止处理item

  • CloseSpider:该异常由spider的回调函数(callback)抛出,来暂停/停止spider。支持参数: reason (str) – 关闭的原因

  • IgnoreRequest:该异常由调度器(Scheduler)或其他下载中间件抛出,声明忽略该request

  • NotConfigured:该异常由某些组件抛出,声明其仍然保持关闭,该异常必须由组件的构造器(constructor)抛出;这些组件包括:

    • Extensions
    • Item pipelines
    • Downloader middlwares
    • Spider middlewares
  • NotSupported:该异常声明一个不支持的特性