def get_id(sn):
try:
return(api.get_user(screen_name=sn)['id'])
except tweepy.RateLimitError:
countdown(960)
get_id(sn)
except tweepy.TweepError as e:
if tweepy.TweepError is "[{u'message': u'Over capacity', u'code': 130}]" or e is "[{u'message': u'Over capacity', u'code': 130}]":
countdown_te(600,e)
get_id(sn)
else:
print(e)
评论列表
文章目录