Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Getting full_text from truncated tweets #491

Description

@jmlipman

Hi guys,

I realized that when using this library I get truncated tweets and I tried to find a solution. I found on the Internet that there is a parameter called "tweet_mode" that you are supposed to tunned as "extended". However, there is no such parameter in the GetSearch function.

I realized that there is a parameter called raw_query, and I also tried to write something like "q=whatever&tweet_mode=extended" but it didn't work.

I made a workaround and I want to share it because someone might find it useful. You just need to modify a couple of lines:

In the file models.py
In the function NewFromJsonDict from Status
Line 469 (below user_mentions=None)
add: full_text = None

Line 478 (below current_user_retweet = data['current_user_retweet']['id'])
add: if 'full_text' in data:
full_text = data['full_text']

Line (last):
add full_text in the parameters such that:
return super(cls, cls).NewFromJsonDict(data=data,
current_user_retweet=current_user_retweet,
hashtags=hashtags,
media=media,
retweeted_status=retweeted_status,
urls=urls,
user=user,
user_mentions=user_mentions,full_text=full_text)

This is just a workaround but it would be great if it's implemented in the library.

Regards,
JM.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions