Skip to content

Commit

Permalink
[Instagram] Display more login errors (yt-dlp#1822)
Browse files Browse the repository at this point in the history
Authored by: MinePlayersPE
  • Loading branch information
MinePlayersPE authored Nov 28, 2021
1 parent bf57cfa commit d298d33
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions yt_dlp/extractor/instagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d298d33

Please sign in to comment.