Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

wait different

  • Loading branch information...
commit cfda00dac04ff95ca1739d623b2cd4a665879b2b 1 parent 420587e
@DFectuoso authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 task_python.py
View
8 task_python.py
@@ -19,13 +19,13 @@ def get_messages_from_user(user, page=0):
print "Fetching user " + user
try:
messages = api.user_timeline(user_id=user,count=200, page=page)
- except error.TweepError:
- print "We are on the limit, wait 30 secs, and call this again"
- time.sleep(30)
+ except:
+ print "We are on the limit, wait 15 secs, and call this again"
+ time.sleep(15)
return get_messages_from_user(user,page)
print "Fetching page:" + str(page)
- time.sleep(30)
+ #time.sleep(30)
if len(messages) > 0:
print "The last message of the user is from " + str(messages[-1].created_at)
print "While the last rockstartup1 message is from: "+str(rockstartup[-1][1])
Please sign in to comment.
Something went wrong with that request. Please try again.