-
-
Save 0xnbk/576895 to your computer and use it in GitHub Desktop.
View who doesn’t follow you (Python)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.