From 464360c7f7d8bccad37eecb56e18ec9882826493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rube=CC=81n=20Varela=20Rosa?= Date: Sun, 26 May 2013 12:53:55 -0400 Subject: [PATCH] Fixed the for loop key and how to access the user name. --- examples/search_results.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/search_results.py b/examples/search_results.py index 96109a4..8c4737a 100644 --- a/examples/search_results.py +++ b/examples/search_results.py @@ -7,6 +7,6 @@ try: except TwythonError as e: print e -for tweet in search_results['results']: - print 'Tweet from @%s Date: %s' % (tweet['from_user'].encode('utf-8'), tweet['created_at']) +for tweet in search_results['statuses']: + print 'Tweet from @%s Date: %s' % (tweet['user']['screen_name'].encode('utf-8'), tweet['created_at']) print tweet['text'].encode('utf-8'), '\n'