mirror of
https://github.com/arnaucube/getTwitterListMembers.git
synced 2026-02-07 03:06:46 +01:00
script done
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*.pyc
|
||||||
|
twitterConfig.py
|
||||||
13
getTwitterListMembers.py
Normal file
13
getTwitterListMembers.py
Normal file
@@ -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
twitterConfigEXAMPLE.py
Normal file
18
twitterConfigEXAMPLE.py
Normal file
@@ -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'
|
||||||
Reference in New Issue
Block a user