【发布时间】:2015-06-27 14:31:09
【问题描述】:
我正在使用tweepy 获取推特推文。我想根据我选择的国家/地区了解当前趋势。我的代码如下:
import tweepy
file = open("data.txt", 'r')
authentication = tweepy.OAuthHandler('consumer_key', 'consumer_secret')
authentication.set_access_token('access_token', 'access_secret')
api = tweepy.API(authentication)
trends = api.trends_available()
for trend in trends:
print trend
上面的代码给了我一个国家列表。我想使用该列表来检查该国当前的趋势。如何提取这些国家/地区的趋势hashtags?
我遇到了this 的问题,但没有答案。
【问题讨论】:
标签: python twitter tweepy twitter-streaming-api