Skip to content

Instantly share code, notes, and snippets.

@rlr
Created May 14, 2009 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlr/111409 to your computer and use it in GitHub Desktop.
Save rlr/111409 to your computer and use it in GitHub Desktop.
py script to find out which twitter users aren't following your back
from twitter.api import Twitter
USERNAME = 'r1cky' # set to your/any username
twitter = Twitter() # username/password not required for these calls
friends = twitter.friends.ids(screen_name=USERNAME)
followers = twitter.followers.ids(screen_name=USERNAME)
guilty = [x for x in friends if x not in followers]
print "There are %s tweeps you follow who do not follow you" % len(guilty)
for user_id in guilty:
user = twitter.users.show(user_id=user_id)
print "%s follows %s and has %s followers." % \
(user['name'], user['friends_count'], user['followers_count'] )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment