Skip to content

A feature-rich command-line audio/video downloader

[instagram] Fix bug in ab2ffab22d02d530e0b46f9e361ff53a2139898b (#1403)

u-spec-pngad64a2323f1c
diff --git a/yt_dlp/extractor/instagram.py b/yt_dlp/extractor/instagram.py
index 24f47f3a82..ccfcddd5bc 100644
--- a/yt_dlp/extractor/instagram.py
+++ b/yt_dlp/extractor/instagram.py
@@ -145,6 +145,8 @@ class InstagramIE(InfoExtractor):
def _login(self):
username, password = self._get_login_info()
+ if username is None:
+ return
login_webpage = self._download_webpage(
'https://www.instagram.com/accounts/login/', None,