From d298d33fe6ce410fcff5d936798486855b48c9ec Mon Sep 17 00:00:00 2001 From: MinePlayersPE Date: Sun, 28 Nov 2021 19:29:55 +0700 Subject: [PATCH] [Instagram] Display more login errors (#1822) Authored by: MinePlayersPE --- yt_dlp/extractor/instagram.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yt_dlp/extractor/instagram.py b/yt_dlp/extractor/instagram.py index 1fcf97a19..dcd077bc0 100644 --- a/yt_dlp/extractor/instagram.py +++ b/yt_dlp/extractor/instagram.py @@ -63,6 +63,10 @@ class InstagramBaseIE(InfoExtractor): 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