2014-04-20 35 views

回答

2

我想你可以使用twython并开始搜索example这样你就可以修改以满足你的需求。

from twython import Twython, TwythonError 

# Requires Authentication as of Twitter API v1.1 
twitter = Twython(APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET) 
try: 
    search_results = twitter.search(q='#python', count=50) 
except TwythonError as e: 
    print e 

for tweet in search_results['statuses']: 
    print tweet['user']['screen_name'].encode('utf-8')