Skip to content

Instantly share code, notes, and snippets.

@wmorland
Last active May 29, 2022 01:11
Show Gist options
  • Save wmorland/0941bca7e9ce221ef1949dec4bc9d32e to your computer and use it in GitHub Desktop.
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
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