New to Python Twitter Search API



I am trying to search for tweets with particular hashtags or keywords and save them in a list. But i am not able to access the tweets from the list itself.
The following code:
twitter = Twitter(auth = oauth)
content =’#oreo’, result_type=‘recent’, lang=‘en’, count=10)

runs smoothly but I am not able to access the data stored in content.
On running:

I get an error:
KeyError: 0

How do I store the result of my queries thruogh the API?


Which Python library are you using?


from twitter import Twitter, OAuth, TwitterHTTPError, TwitterStream

This is the import statement. Python version being 3.5.2


Thanks for getting back in touch here. It might be helpful to see a full version of the code you are working on. Do you have a full code snippet I can look at? I’ve personally had a lot of success with using the Search Tweets Python wrapper.