Created
April 15, 2022 18:15
-
-
Save srezasm/76688fc084e83d1681f843a7c72d5cfa to your computer and use it in GitHub Desktop.
How to get twitter list members with tweepy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tweepy | |
auth = tweepy.OAuthHandler("CONSUMER_KEY", "CONSUMER_SECRET") | |
auth.set_access_token("ACCESS_TOKEN","ACCESS_TOKEN_SECRET") | |
api = tweepy.API(auth) | |
list_id = 1476313231572578313 # your list id | |
for user in tweepy.Cursor(api.list_members, list_id=list_id).items(): | |
# hack 'm all | |
print(user.id_str) | |
print(user.name) | |
print(user.screen_name) | |
print(user.description) | |
print(user.url) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment