title: Avoid rate limitation (Error: 420) in twitter streaming api
body: <p>I am trying to fetch streaming data from the twitter-streaming-api using the <code>tweepy</code> library in python. However, even after a lot of trials I am not able to get any <code>data</code> or print it as done in the <code>on_data</code> method. It's giving the 420 error message. How can I avoid it? </p>
  
  <pre><code>import io
  import json
  import time
  import tweepy
  
  
  access_token = 'XXXXXX'
  access_token_secret = 'XXXXXX'
  consumer_key = 'XXXXXX'
  consumer_secret = 'XXXXXX'
  
  class MyListener(tweepy.StreamListener):
  
      def on_status(self, status):
          print(status.text)
  
      def on_data(self, tweetdata):
          data = json.loads(tweetdata)           
          print(data)
  
      def on_error(self, status):
          print(status)
  
  auth = tweepy.OAuthHandler(consumer_secret=consumer_secret,consumer_key=consumer_key)
  auth.set_access_token(access_token,access_token_secret)
  api = tweepy.API(auth)
  
  myListener = MyListener()
  myStream = tweepy.Stream(auth = api.auth, listener=myListener)
  myStream.filter(languages='en',track=['@NBA'],async=True)
  myStream.disconnect()
  </code></pre>