from time import sleep from mastodon import Mastodon with open('token.txt','r') as token: mastodon = Mastodon(access_token=token.read(),api_base_url="https://post.lurk.org/") # print all accounts in post.lurk.org/ i = 1 while True: account = mastodon.account(i) print(account, account['display_name'], "\n") i = i +1 sleep(1)