如何检索推文的全文?

时间:2017-11-21 14:42:46

标签: python python-3.x twitter tweepy python-twitter

我运行下面的代码,甚至我设置为参数tweet_mode='extended'我没有得到检索到的推文的全文。有人可以帮我解决吗?

import tweepy

consumer_key ='xxxx'
consumer_secret = 'xxxx'

access_token = 'xxxx'
access_token_secret = 'xxxx'

# create our authentication variable
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token,access_token_secret)

api = tweepy.API(auth)

cursor= tweepy.Cursor(api.search,q="obama",tweet_mode='extended', lang="en", date='2017-11-13', days_ago=9).items(5)

for tweet in cursor:
    print (tweet.created_at,tweet.full_text)

以下是相应的结果。

2017-11-21 13:55:20 Another one of Obama's poor little underprivileged Black ladies, oppressed by Whites? 
2017-11-21 13:55:20 RT @PoliticalShort: Remember when it was considered immoral to question whether Obama’s 20-year patronage at Wright’s radical church could…
2017-11-21 13:55:20 RT @IosrscIub: i had a dream that i was trying to find a fruit scale in walmart to weigh my pomegranates and then obama stopped me, took th…
2017-11-21 13:55:19 @WhereIs_Billy @FoxNews No Ure wrong! He saved them from possible yrs in jail there Dumb Ass! Look Wht happened to Otto cause Racist OBAMA did NOTHING! Mayb all u liberals shld go to N K good bye!  No F...... Respect! MAGA MAGA
2017-11-21 13:55:19 RT @oldhippiebroad: This is no judge. He’s politician all the way. He’s a disgrace. #UraniumOneScandal #LockThemAllUp  

1 个答案:

答案 0 :(得分:0)

Twitter没有提供转发(RT)的全文。

看起来第1和第4条消息已经完成,其他带有RT的时间戳已经被Twitter截断了' ...'最后。

最后一条RT消息足够短,不会被截断。

相关问题