Can it be done like this:
If load_session_from_file fails, for example because the password has changed, is there any way to catch the error and for example authorize via username and password?
Like something like this, but it immediately triggers a warning and falls asleep.
try:
loader.load_session_from_file(auth['username'])
#try login...
except:
loader.login(auth['username'], auth['password'])
loader.save_session_to_file()
#try login...
Instagram responded with HTTP error "429 - Too Many Requests". Please do not run multiple instances of Instaloader in parallel or within short sequence. Also, do not use any Instagram App while Instaloader is running. The request will be retried in 666 seconds, at 02:47.
After a while it came to me:
try:
loader.load_session_from_file(auth['username'], auth['username'] + auth['password'])
except:
loader.login(auth['username'], auth['password'])
loader.save_session_to_file(auth['username'] + auth['password'])
[!] Safety is out of the question