script done
arnaucode arnaucode@gmail.com
Wed, 04 Oct 2017 10:32:05 +0200
3 files changed,
33 insertions(+),
0 deletions(-)
A
getTwitterListMembers.py
@@ -0,0 +1,13 @@
+# coding=utf-8 +import tweepy +import twitterConfig + +# READ 'twitterConfigEXAMPLE.py' FOR THE CONFIGURATION INSTRUCTIONS + +auth = tweepy.OAuthHandler(twitterConfig.consumer_key, twitterConfig.consumer_secret) +auth.set_access_token(twitterConfig.access_token_key, twitterConfig.access_token_secret) +api = tweepy.API(auth) + + +for member in tweepy.Cursor(api.list_members, twitterConfig.list_owner, twitterConfig.list_name).items(): + print member.screen_name + ',' + twitterConfig.list_owner
A
twitterConfigEXAMPLE.py
@@ -0,0 +1,18 @@
+# coding=utf-8 + +# INSTRUCTIONS +# -FIRST: copy this file and rename it to: 'twitterConfig.py' +# -SECOND: put the twitter app keys +# -THIRD: put the list_owner and list_name +# example: https://twitter.com/userexample/lists/listnameexample/members +# list_owner='userexample' +# list_name='listnameexample' + +# Here the twitter app keys +consumer_key="xxxxx" +consumer_secret="xxxxx" +access_token_key="xxxxx" +access_token_secret="xxxxx" + +list_owner='userOwnerOfTheList' +list_name='listName'