📌  相关文章
📜  如何在 instagram python 代码示例上获取关注者列表

📅  最后修改于: 2022-03-11 14:46:10.647000             🧑  作者: Mango

代码示例1
# 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())