def spider_closed(self, spider, reason):
"""
????????????
:param spider:
:param reason: finished/cancelled/shutdown
:return:
"""
print time.strftime("%Y-%m-%d %H:%M:%S"), 'StatsPipeline Signals: spider_closed'
print spider.crawler.stats.get_stats()
print spider.crawler.stats.get_value('downloader/request_count', 0) # ????
print spider.crawler.stats.get_value('downloader/response_count', 0) # ????
print spider.crawler.stats.get_value('response_received_count', 0) # ??????
print spider.crawler.stats.get_value('item_dropped_count', 0) # ??????
print spider.crawler.stats.get_value('item_scraped_count', 0) # ??????
评论列表
文章目录