We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我最近也在学习下Python的网络爬虫,非常感谢你的分享。 我今天在搭建好环境后尝试Spider_Python项目时遇到一个问题,无法连接mongodb,提示的错误是pymongo不存在Connection模块,然后我在网上找了下pymongo的用法,做了如下修改后可以正常运行并存入mongodb。 # 连接数据库,db和posts为数据库和集合的游标 def Connection(self): #connect to mongo(localhost:27017) mongoclient = pymongo.MongoClient() mongodb = mongoclient[self.database] posts = mongodb.posts return posts
# 连接数据库,db和posts为数据库和集合的游标 def Connection(self): #connect to mongo(localhost:27017) mongoclient = pymongo.MongoClient() mongodb = mongoclient[self.database] posts = mongodb.posts return posts
The text was updated successfully, but these errors were encountered:
No branches or pull requests
我最近也在学习下Python的网络爬虫,非常感谢你的分享。
我今天在搭建好环境后尝试Spider_Python项目时遇到一个问题,无法连接mongodb,提示的错误是pymongo不存在Connection模块,然后我在网上找了下pymongo的用法,做了如下修改后可以正常运行并存入mongodb。
# 连接数据库,db和posts为数据库和集合的游标 def Connection(self): #connect to mongo(localhost:27017) mongoclient = pymongo.MongoClient() mongodb = mongoclient[self.database] posts = mongodb.posts return posts
The text was updated successfully, but these errors were encountered: