]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[youtube] Add ability to authenticate with cookies
authorSergey M․ <dstftw@gmail.com>
Sat, 21 Apr 2018 23:08:05 +0000 (06:08 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 21 Apr 2018 23:08:05 +0000 (06:08 +0700)
youtube_dl/extractor/youtube.py

index e9965509ce404b71bb44843882d79f9884a97a25..e7bd1f18fb504c8541d0fbdc301980cab07d1f54 100644 (file)
@@ -87,7 +87,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
         (username, password) = self._get_login_info()
         # No authentication to be performed
         if username is None:
-            if self._LOGIN_REQUIRED:
+            if self._LOGIN_REQUIRED and self._downloader.params.get('cookiefile') is None:
                 raise ExtractorError('No login info available, needed for using %s.' % self.IE_NAME, expected=True)
             return True