Browse Source

script done

master
arnaucode 7 years ago
parent
commit
4648c65336
3 changed files with 33 additions and 0 deletions
  1. +2
    -0
      .gitignore
  2. +13
    -0
      getTwitterListMembers.py
  3. +18
    -0
      twitterConfigEXAMPLE.py

+ 2
- 0
.gitignore

@ -0,0 +1,2 @@
*.pyc
twitterConfig.py

+ 13
- 0
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

+ 18
- 0
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'

Loading…
Cancel
Save