Last active
May 10, 2021 02:18
-
-
Save thezakman/527aa88afec841dc0a447d32b6ec75ad to your computer and use it in GitHub Desktop.
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
# pip install instaloader | |
import instaloader | |
L = instaloader.Instaloader() | |
# Change for the Instagram profile you want the followers list | |
profile = "TheZakMan" | |
# Use your credentials to load session | |
username = "YourUsername" | |
password = "YourPassword" | |
L.login(username, password) # (login) | |
# Obtain profile metadata | |
profile = instaloader.Profile.from_username(L.context, profile) | |
# Print list of followers | |
follow_list = [] | |
count = 0 | |
for followee in profile.get_followers(): | |
follow_list.append(followee.username) | |
file = open("followers.txt", "a+") | |
file.write(follow_list[count]) | |
file.write("\n") | |
file.close() | |
print(follow_list[count]) | |
count = count + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment