Python Twitter API:search_30_day

问题描述

我正在尝试为我的代码创建一个数据框,但是当我运行它时,我只得到一个空列/行

# This grabs the search of all specified tweets within 30 days

choice = input("Enter the hashtag: ")

tweets = tweepy.Cursor(api.search_30_day,environment_name = "AMC",query = choice).items(100)

j = 1
for tweet in tweets: 
    if tweet.lang == "en":
        print(str(j) + ") " + tweet.text + "\n")
        j = j + 1



# Create a dataframe with a column called Tweets FOR SEARCH_30_DAYS
    
    df = pd.DataFrame( [tweet.full_text for tweet in tweets],columns = ["Tweets"])
    df.head()

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)