Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- api = tw_oauth('./auth.k')
- coursor = tweepy.Cursor(api.search, q='site.ru', count = 20)
- for tweet in coursor.items():
- ...
- def limit_handled(cursor):
- while True:
- try:
- yield cursor.next()
- except tweepy.RateLimitError:
- time.sleep(15 * 60)
- for tweet in limit_handled(tweepy.Cursor(api.search, q='site.ru', count = 20).items()):
- print (tweet.id)
Add Comment
Please, Sign In to add comment