title: Twitter Random Rate Limiting
body: <p>I am trying to retrieve user Friend network using python-twitter API. I am using the getFriendIDs() method which retrieves the ids of all the accounts a particular twitter user is following. The following is a small snipped of my test code:</p>
  
  <pre><code>for item in IdList:
      aDict[item] = api.GetFriendIDs(user_id=item,count=4999)
      print "sleeping 60"
      time.sleep(66)
      print str(api.MaximumHitFrequency())+" The maximum hit frequency"
      print api.GetRateLimitStatus()['resources']['friends']['/friends/ids']['remaining']
  </code></pre>
  
  <p>There are 35 ids (of twitter user accounts) in IdList and for each item I am retrieving upto 4999 Ids that the current user with id 'item' is following. I am aware of the new rate-limiting by twitter wherein the rate-limit window has been changed from 60 minutes to 15 minutes and the fact that they advice you not to make more than one request to the server per minute (api.MaximumHitFrequency()). So basically 15 requests in 15 minutes. That is exactly what I'm doing in fact I'm making a request to the server every 66 seconds and not 60 seconds but I get a rate-limit error after 6 requests. I am unable to figure out why this is happening. Please do let me know if anyone else has had this problem. </p>