Create item-pipeline.rst

This commit is contained in:
Casker 2017-06-09 16:12:20 +08:00 committed by GitHub
parent fad6b70d92
commit ae679f6499
1 changed files with 1 additions and 1 deletions

View File

@ -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/