我正在使用tweepy从用户的时间轴中使用包含的脚本获取tweets here。然而,微博在截断未来:使用tweepy从“user_timeline”获取完整的tweet文本
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_key, access_secret)
api = tweepy.API(auth)
new_tweets = api.user_timeline(screen_name = screen_name,count=200, full_text=True)
返回:
Status(contributors=None,
truncated=True,
text=u"#Hungary's new bill allows the detention of asylum seekers
& push backs to #Serbia. We've seen push backs before so\u2026 https://
t.co/iDswEs3qYR",
is_quote_status=False,
...
也就是说,对于一些i
,new_tweets[i].text.encode("utf-8")
看起来像
#Hungary's new bill allows the detention of asylum seekers &
push backs to #Serbia. We've seen push backs before so…https://t.co/
iDswEs3qYR
凡在后者...
替换文本通常会在Twitter上显示。
是否有人知道如何覆盖truncated=True
以获取我的请求上的全文?
你在做什么,以收到回报? –
对不起,回复很慢,刚才看到这个 - 我只是漂亮的打印'new_tweets [0]'。 – atkat12
[Tweepy Truncated Status]的可能重复(http://stackoverflow.com/questions/42050289/tweepy-truncated-status) – mountrix