0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-26 02:55:17 +00:00

[Instagram] Display more login errors (#1822)

Authored by: MinePlayersPE
This commit is contained in:
MinePlayersPE 2021-11-28 19:29:55 +07:00 committed by GitHub
parent bf57cfa8b7
commit d298d33fe6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,6 +63,10 @@ def _login(self):
if not login.get('authenticated'): if not login.get('authenticated'):
if login.get('message'): if login.get('message'):
raise ExtractorError(f'Unable to login: {login["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') raise ExtractorError('Unable to login')
InstagramBaseIE._IS_LOGGED_IN = True InstagramBaseIE._IS_LOGGED_IN = True