Answers for "how to get a list of followers on instagram python"

0

how to get a list of followers on instagram python

# Get instance
import instaloader

L = instaloader.Instaloader()

# Login or load session
username = "myusername"
password = "mypassword"
L.login(username, password)  # (login)

# Obtain profile metadata
profile = instaloader.Profile.from_username(L.context, username)

# Print list of followees
follow_list = []
count = 0
for followee in profile.get_followers():
    follow_list.append(followee.username)
    file = open("prada_followers.txt", "a+")
    file.write(follow_list[count])
    file.write("\n")
    file.close()
    print(follow_list[count])
    count = count + 1
# (likewise with profile.get_followers())
Posted by: Guest on October-11-2021

Code answers related to "how to get a list of followers on instagram python"

Python Answers by Framework

Browse Popular Code Answers by Language