title: Parsing Twitter JSON object in Python
body: <p>I am trying to download tweets from twitter.</p>
  
  <p>I have used python and Tweepy for this. Though I am new to both Python and Twitter API.</p>
  
  <p>My Python script is as follow:
      #!usr/bin/python</p>
  
  <pre><code>#import modules
  import sys
  import tweepy
  import json
  
  #global variables
  consumer_key = ''
  consumer_secret = ''
  token_key = ''
  token_secret = ''
  
  #Main function
  def main():
      print sys.argv[0],'starts'
      auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
      auth.set_access_token(token_key, token_secret)
      print 'Connected to Twitter'
      api = tweepy.API(auth)
      if not api.test():
          print 'Twitter API test failed'
  
      print 'Experiment with cursor'
      print 'Get search method returns json objects'
  
     json_search = api.search(q="football")
     #json.loads(json_search())
     print  json_search
  
  
  #Standard boilerplate to call main function if this file runs
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>I am getting result as follows:</p>
  
  <pre><code>[&lt;tweepy.models.SearchResult object at 0x9a0934c&gt;, &lt;tweepy.models.SearchResult object at 0x9a0986c&gt;, &lt;tweepy.models.SearchResult object at 0x9a096ec&gt;, &lt;tweepy.models.SearchResult object at 0xb76d8ccc&gt;, &lt;tweepy.models.SearchResult object at 0x9a09ccc&gt;, &lt;tweepy.models.SearchResult object at 0x9a0974c&gt;, &lt;tweepy.models.SearchResult object at 0x9a0940c&gt;, &lt;tweepy.models.SearchResult object at 0x99fdfcc&gt;, &lt;tweepy.models.SearchResult object at 0x99fdfec&gt;, &lt;tweepy.models.SearchResult object at 0x9a08cec&gt;, &lt;tweepy.models.SearchResult object at 0x9a08f4c&gt;, &lt;tweepy.models.SearchResult object at 0x9a08eec&gt;, &lt;tweepy.models.SearchResult object at 0x9a08a4c&gt;, &lt;tweepy.models.SearchResult object at 0x9a08c0c&gt;, &lt;tweepy.models.SearchResult object at 0x9a08dcc&gt;]
  </code></pre>
  
  <p>Now I am confused how to extract tweets from this information?
  I tried to use json.loads method on this data. But it gives me error as JSON expects string or buffer. 
  Example code would be highly appreciated.
  Thanks in advance.</p>