Fixed the for loop key and how to access the user name.
This commit is contained in:
parent
b99db3c90c
commit
464360c7f7
1 changed files with 2 additions and 2 deletions
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue