1
0
Fork 0
mirror of https://codeberg.org/polarisfm/youtube-dl.git synced 2024-12-23 08:12:28 +00:00

[youtube] Add ability to authenticate with cookies

This commit is contained in:
Sergey M․ 2018-04-22 06:08:05 +07:00
parent 3853309fe2
commit 70d35d166c
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View 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