python - 在 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
解决方案
推荐阅读
- python - 来自请求 Python 库的 HTTP 请求中缺少主机标头
- axapta - 工作区上的 D365FO 平铺计数不起作用
- javascript - 为什么有两种不同的Javascript?
- python-3.x - AttributeError:Python 'filter' 对象没有属性 'sort'
- sql-server - 在 SSIS 中将平面文件作为源导入 SQL Server 时处理逗号分隔文件中的逗号
- android - 如何修复“IllegalStateException”错误?
- c - 致命错误:asm/linkage.h: No such file or directory, C/C++ 问题
- regex - 如何在可能包含它的强制性组之后匹配可选组
- python - Matplotlib 在两边添加空格
- docker - nginx 是否为所有浏览器请求添加路径?