Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Create item-pipeline.rst

Caskerae679f6499b7
diff --git a/docs/topics/item-pipeline.rst b/docs/topics/item-pipeline.rst
index ac0a5973b..38265b474 100644
--- a/docs/topics/item-pipeline.rst
+++ b/docs/topics/item-pipeline.rst
@@ -156,7 +156,7 @@ method and how to clean up the resources properly.::
self.client.close()
def process_item(self, item, spider):
- self.db[self.collection_name].insert(dict(item))
+ self.db[self.collection_name].insert_one(dict(item))
return item
.. _MongoDB: https://www.mongodb.org/