Prevent Tweepy from falling behind
<p><code>streamer.filter(locations=[-180, -90, 180, 90], languages=['en'], async=True)</code></p>

<p>I am trying to extract the tweets which have been geotagged from the twitter streaming API using the above call. However, I guess tweepy is not able to handle the requests and quickly falls behind the twitter rate. Is there a suggested workaround the problem ?</p>

<p>There is no workaround to rate limits other than polling for the rate limit status and waiting for the rate limit to be over. you can also use the flag 'wait_on_rate_limit=True'. This way tweepy will poll for rate limit by itself and sleep until the rate limit period is over.</p>

<p>You can also use the flag 'monitor_rate_limit=True' if you want to handle the rate limit "Exception" by yourself.</p>

<p>That being said, you should really devise some smaller geo range, since your rate limit will be reached every 0.000000001 seconds (or less... it's still twitter).</p>

python twitter tweepy