我使用了twitter搜索API,还合并了extended_mode
和full_text
属性,但是我仍然从API中得到一个截断的字符串
这是我的密码:
results = t.search(q='tuberculosis', count=50, lang='en', result_type='popular',tweet_mode='extended')
all_tweets = results['statuses']
for tweet in all_tweets:
tweetString = tweet["full_text"]
userMentionList = tweet["entities"]["user_mentions"]
if len(userMentionList)>0:
for eachUserMention in userMentionList:
name = eachUserMention["screen_name"]
time = tweet["created_at"]
wks.insert_rows(wks.rows, values=[tweetString, name, time], inherit=True)
如果您使用的是TwitterSearch,以下功能应该可以正常工作:
当然,您可以设置所需的属性,如语言和计数
相关问题 更多 >
编程相关推荐