Twitter 流 API 不返回完整的推文 [英] Twitter streaming API not return full tweets
本文介绍了Twitter 流 API 不返回完整的推文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用 tweepy 编写了流式推文的代码,但似乎推文被截断了,我得到的长推文未满,它们以...结尾
I used tweepy to write the code to streaming tweets, but it seems the tweets were truncated and the long tweets I got are not full, they are end with ...
有什么办法可以流式传输完整的长推文?
Is there any way that I could streaming the full long tweets?
推荐答案
将此参数添加到您的请求中:tweet_mode=extended
解析每条推文时,使用 full_text
而不是 text
.
Add this parameter to your request: tweet_mode=extended
When parsing each tweet, use full_text
instead of text
.
此处记录:https://developer.twitter.com/en/docs/tweets/tweet-updates.html
这篇关于Twitter 流 API 不返回完整的推文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文