title: Where to exclude retweets in this tweepy script?
body: <p>I have the following code which allows me to view a stream of 1% of the twitter firehose via python:</p>
  
  <pre><code>import sys
  import tweepy
  
  consumer_key=""
  consumer_secret=""
  access_key = ""
  access_secret = "" 
  
  
  auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
  auth.set_access_token(access_key, access_secret)
  api = tweepy.API(auth)
  
  
  class CustomStreamListener(tweepy.StreamListener):
      def on_status(self, status):
          if '' in status.text.lower():
              print status.text
              print status.coordinates
  
      def on_error(self, status_code):
          print &gt;&gt; sys.stderr, 'Encountered error with status code:', status_code
          return True # Don't kill the stream
  
      def on_timeout(self):
          print &gt;&gt; sys.stderr, 'Timeout...'
          return True # Don't kill the stream
  
  sapi = tweepy.streaming.Stream(auth, CustomStreamListener())
  sapi.filter(track=['example'])
  </code></pre>
  
  <p>I know the syntax <code>include_rts = False</code> will remove retweets from the stream I am viewing, but I am not sure where to add it to the above code.</p>
  
  <p>Can anyone assist?</p>
  
  <p>Thanks</p>