Last active
May 29, 2022 01:11
-
-
Save wmorland/0941bca7e9ce221ef1949dec4bc9d32e to your computer and use it in GitHub Desktop.
Find people you follow on Instagram who don't follow you back based on Instagram data download
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 json | |
def format_username(username): | |
return "https://www.instagram.com/{username}".format(username=username) | |
# Press the green button in the gutter to run the script. | |
if __name__ == '__main__': | |
with open('connections.json') as f: | |
data = json.load(f) | |
followers = list(data['followers'].keys()) | |
following = list(data['following'].keys()) | |
for follower in followers: | |
if follower in following: | |
following.remove(follower) | |
following.sort() | |
links = map(format_username, following) | |
print(*links, sep="\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment