Skip to content

Instantly share code, notes, and snippets.

@0xnbk
Created September 13, 2010 06:33
Show Gist options
  • Save 0xnbk/576895 to your computer and use it in GitHub Desktop.
Save 0xnbk/576895 to your computer and use it in GitHub Desktop.
View who doesn’t follow you (Python)
import twitter, sys, getpass, os
def call_api(username,password):
api = twitter.Api(username,password)
friends = api.GetFriends()
followers = api.GetFollowers()
heathens = filter(lambda x: x not in followers,friends)
print "There are %i people you follow who do not follow you:" % len(heathens)
for heathen in heathens:
print heathen.screen_name
if __name__ == "__main__":
password = getpass.getpass()
call_api(sys.argv[1], password)
@0xnbk
Copy link
Author

0xnbk commented Sep 13, 2010

View who doesn’t follow you (Python)

Some people don’t like the idea of following people who don’t follow you back. If you recognized yourself in this statement, there’s a huge amount of chances that you’ll enjoy the following Python code snippet.
Simply type your Twitter username and password on line 4 and call the file using the Python interpreter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment