Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 630 Bytes

v2_pagination.rst

File metadata and controls

29 lines (19 loc) · 630 Bytes

tweepy

Pagination

Paginator

Example

import tweepy

client = tweepy.Client("Bearer Token here")

for response in tweepy.Paginator(client.get_users_followers, 2244994945,
                                    max_results=1000, limit=5):
    print(response.meta)

for tweet in tweepy.Paginator(client.search_recent_tweets, "Tweepy",
                                max_results=100).flatten(limit=250):
    print(tweet.id)

tweepy.asynchronous.AsyncPaginator