ckoepp / TwitterSearch

A Python library to easily iterate tweets found by the Twitter Search API
MIT License
387 stars 112 forks source link

Truncated Tweets #35

Open connerlambden opened 6 years ago

connerlambden commented 6 years ago

Hi, any way to set tweet_mode to extended so I can access non-truncated tweets? Thanks.

asterzwx commented 6 years ago

has there been any solution to this issue?

slarrain commented 6 years ago

As a workaround, and following #34 , you can do this:

tso.arguments.update({'tweet_mode':'extended'})

and it will return an object that instead of a text key, has a full_text key, with the full text. I've tested it, and it works. A PR should be fairly easy to implement, following said #34 .

carlaTV commented 6 years ago

Hi,

when setting tweet_mode to extended it indeed returns the full text tweets. However, it doesn't work with retweets. I have tried to set "retweet_mode" to "extended" as well, but it doesn't seem to work.

Any hint? Thanks!

slarrain commented 6 years ago

I believe that is a limitation from the Twitter API. Retweets do not come with the original tweet's full text. I think, however, that you have an object inside the RT that is the original tweet. And you also get the tweet id of the original tweet, so you could query the original tweet and pass the extended parameter.

But for RTs, yes, you are right. Twitter API returns truncated text. As far as I know. Sorry about that.