首页 > 解决方案 > 在 python 情绪分析中使用 twiiter 标签的方法?

问题描述

有没有办法在这段代码中提取推特标签而不是来自单个用户的推文。我正在用 python/ 进行情绪分析

# Extract 100 tweets from the twitter user
posts = api.user_timeline(screen_name="OlectraEbus", count = 100, lang ="en", tweet_mode="extended")

#  Print the last 5 tweets
print("Show the 5 recent tweets:\n")
i=1
for tweet in posts[:5]:
    print(str(i) +') '+ tweet.full_text + '\n')
    i= i+1

标签: pythontwitter

解决方案


我推荐两个阅读链接:

  1. 链接 1

  2. 链接 2


推荐阅读