Get all tweets from a user using python-twitter

I am trying to get all tweets from a user in python using lib .

The method provided in python-twitter for this is defined as:

def GetUserTimeline(self, user_id=None, screen_name=None, since_id=None, max_id=None, count=None, include_rts=None, trim_user=None, exclude_replies=None): 

Although if the quantity is limited to 200.

Documentation:

amount: Indicates the number of statuses to retrieve. May not be more than 200. [Optional]

Now my question is: Can I get all the tweets from the user using this library? And is there an alternative solution?

+4
source share
1 answer

The short answer is no.

The Twitter API explicitly says that you cannot get more than 200 tweets from a user per request , so this is not a limitation of this particular library that you use, but a limitation imposed by Twitter. But keep in mind what this request is, if you send multiple requests, you can receive up to 3200 tweets in total . But that still means that you cannot get all the tweets, only 3200.

Here is the official Twitter API info / user_timeline endpoint documentation.

+7
source

Source: https://habr.com/ru/post/1492236/


All Articles