stats.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:scrapy_project 作者: zhanghe06 项目源码 文件源码
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)  # ??????
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号