When will search 1.1 break a while True loop?


#1

For a particular search term, I want to fetch all the tweets that search 1.1 will allow…

In my tests, I’m issuing queries inside a while loop, like this pseudocode

my_search_request(q=my_hashtag, count=100, result_type="recent")
my_max_id = response[u"statuses"][-1][u"id_str"]

while True:
     my_search_request(q=my_hashtag, count=100, max_id=my_max_id, result_type="recent")
     my_max_id = response[u"statuses"][-1][u"id_str"]

My question is: when will this loop break?

I’ve run this a couple of times, and as far as I can tell it seems that the loop will break when I reach my rate limit…

IIRC in search 1.0, a loop like the above (with the appropiate pagination tweaks) would break at around 15 pages…

Thanks!!!