Skip to content

How to get all the followig from my account? #496

Answered by basinbasin
nalindev asked this question in Questions
Discussion options

You must be logged in to vote

That page has an example where a cursor is used as the second parameter in the get_follows call:


def main() -> None:
    # This is an example for get_follows method.
    client = Client()
    username = ""
    password = ""
    client.login(username, password)
    handle = username

    cursor = None
    follows = []

    while True:
        fetched = client.get_follows(actor=handle, cursor=cursor)
        follows = follows + fetched.follows

        if not fetched.cursor:
            break

        cursor = fetched.cursor

    print(follows)

Does that help at all?

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@nalindev
Comment options

Comment options

You must be logged in to vote
1 reply
@nalindev
Comment options

Answer selected by nalindev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants