diff --git a/instaloader/instaloadercontext.py b/instaloader/instaloadercontext.py index b575710..b19f1ba 100644 --- a/instaloader/instaloadercontext.py +++ b/instaloader/instaloadercontext.py @@ -331,7 +331,8 @@ class InstaloaderContext: while resp.is_redirect: redirect_url = resp.headers['location'] self.log('\nHTTP redirect from https://{0}/{1} to {2}'.format(host, path, redirect_url)) - if redirect_url.startswith('https://www.instagram.com/accounts/login'): + if (redirect_url.startswith('https://www.instagram.com/accounts/login') or + redirect_url.startswith('https://i.instagram.com/accounts/login')): if not self.is_logged_in: raise LoginRequiredException("Redirected to login page. Use --login.") # alternate rate limit exceeded behavior