【发布时间】:2017-07-31 00:38:29
【问题描述】:
我正在使用 tweepy 使用包含here 的脚本从用户的时间线中获取推文。但是,推文会被截断:
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]。