def manage_auth_handlers(auths):
index = 0
while True:
api = auths[index]
try:
limit = api.rate_limit_status()
status_limit = limit['resources']['statuses']['/statuses/user_timeline']['remaining']
if status_limit > 180:
return api
except tweepy.TweepError as e:
#print('manage_auth_handlers ' + str(e))
pass
finally:
if index == (len(auths) - 1):
index = 0
else:
index += 1
oauth_handler.py 文件源码
python
阅读 43
收藏 0
点赞 0
评论 0
评论列表
文章目录