根据_id查询数据代码如下 from bson.objectid import ObjectId articles.find_one({‘_id’:ObjectId(‘50f0d76347f4ec148890ef1e’)}) 个人博客 https://blog.csdn.net/happybai11