代码
import instaloader
InstaLogin = instaloader.Instaloader()
# Login to Instagram
username = "test"
password = "Password123#"
InstaLogin.login(username, password) # (login)
# Obtain profile metadata
profile = instaloader.Profile.from_username(InstaLogin.context, username)
# Print Who I am Following
follow_list = []
cnt = 0
for follows in profile.get_followers():
follow_list.append(follows.username)
file = open("prada_followers.txt", "a+")
file.write(follow_list[count])
file.write("\n")
file.close()
print(follow_list[count])
cnt += 1
错误信息
raise ConnectionException("Login: Checkpoint required. Point your browser to "
instaloader.exceptions.ConnectionException: Login: Checkpoint required. Point your browser to https://www.instagram.com/challenge/#################/ - follow the instructions, then retry.
我用#替换了链接,但我的问题是如何跳过这个挑战,或者如何让代码在不中断程序的情况下自动执行此操作?