Open getElementsByName opened 3 years ago
from pymongo import MongoClient
import time
user_pwd = 'username:password'
client = MongoClient(
f'mongodb://{user_pwd}@---:27017/?readPreference=secondaryPreferred&authSource=admin'
)
db = client.myplace_abuse
start = time.time()
result = db.place.find({
'place_id': 00000
}).limit(100)
# result = db.review.find({
# 'idno': "---"
# }).limit(100)
doc_list = [doc for doc in result]
print(doc_list)
end = time.time()
print(f'time: {end - start}')
zip