def close_spider(self, spider):
        if self.item_buffer:
            self.insert_item(self.item_buffer, spider)
Method called when the spider is closed
dataset/ETHPy150Open sebdah/scrapy-mongodb/scrapy_mongodb.py/MongoDBPipeline.close_spider