Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 567 Bytes

v1_pagination.rst

File metadata and controls

28 lines (19 loc) · 567 Bytes
.. currentmodule:: tweepy

Pagination

.. autoclass:: Cursor
    :members:

Example

import tweepy

auth = tweepy.OAuth2AppHandler("Consumer Key here", "Consumer Secret here")
api = tweepy.API(auth)

for status in tweepy.Cursor(api.search_tweets, "Tweepy",
                            count=100).items(250):
    print(status.id)

for page in tweepy.Cursor(api.get_followers, screen_name="TwitterDev",
                            count=200).pages(5):
    print(len(page))