]> jfr.im git - yt-dlp.git/commitdiff
[Instagram] Display more login errors (#1822)
authorMinePlayersPE <redacted>
Sun, 28 Nov 2021 12:29:55 +0000 (19:29 +0700)
committerGitHub <redacted>
Sun, 28 Nov 2021 12:29:55 +0000 (17:59 +0530)
Authored by: MinePlayersPE

yt_dlp/extractor/instagram.py

index 1fcf97a196e138241315c51d6f07ecde7369ebce..dcd077bc06ddf7dfb16d385fdacd235f5ae3e98b 100644 (file)
@@ -63,6 +63,10 @@ def _login(self):
         if not login.get('authenticated'):
             if login.get('message'):
                 raise ExtractorError(f'Unable to login: {login["message"]}')
+            elif login.get('user'):
+                raise ExtractorError('Unable to login: Sorry, your password was incorrect. Please double-check your password.', expected=True)
+            elif login.get('user') is False:
+                raise ExtractorError('Unable to login: The username you entered doesn\'t belong to an account. Please check your username and try again.', expected=True)
             raise ExtractorError('Unable to login')
         InstagramBaseIE._IS_LOGGED_IN = True