pipelines.py 文件源码

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

项目:finance_news_analysis 作者: pskun 项目源码 文件源码
def process_eastmoney_gubalist_item(self, item, spider):
        status = item.get('status')
        if status is not None and status != 200:
            self.error_count += 1
            if self.error_count * 5 > self.success_count:
                raise CloseSpider(
                    'too many error occurred, shutdown gracefully.')
            return item

        if 'ticker_id' not in item or item['ticker_id'] == "":
            raise DropItem('??ticker_id')
        self.write_to_file(item, spider.name)
        pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号