码迷,mamicode.com
首页 > 其他好文 > 详细

scrapy执行流程

时间:2018-04-03 23:56:09      阅读:231      评论:0      收藏:0      [点我收藏+]

标签:roc   请求   download   call   from   and   response   执行   ext   

  1. def _next_request_from_scheduler(self, spider): fetch一个request,调用http11 handler,client的agent,返回的是deffered。
  2. _handle_downloader_output()if isinstance(response, Request):如果是请求,继续爬行,调用crawl时会把请求放到调度器
                self.crawl(response, spider)
  3. def enqueue_scrape( 请求入队
  4. def _scrape_next(self, spider, slot):
  5. _scrape2
  6. call_spider
  7. handle_spider_output
  8. _process_spidermw_output
             

scrapy执行流程

标签:roc   请求   download   call   from   and   response   执行   ext   

原文地址:https://www.cnblogs.com/pyhai/p/8711340.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!