def search_mongodb(url, times=0):
"""???????????mongodb?"""
try:
ret = db.weixin.find_one({'url': url})
if not ret:
return True
else:
return False
except AutoReconnect:
times += 1
if times <= 5:
print('?????????????mongodb')
search_mongodb(url, times)
else:
print('mongodb????')
return False
评论列表
文章目录