1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-05 06:32:56 +08:00

niconico: Support authentication with cookie

This commit is contained in:
Jian-Long Huang 2015-12-24 01:28:39 +08:00
parent 60427f63d1
commit c98ff70f1f

View File

@ -92,8 +92,14 @@ class NiconicoIE(InfoExtractor):
def _login(self):
(username, password) = self._get_login_info()
# No authentication to be performed
if not username:
# Check session cookie
for cookie in self._downloader.cookiejar:
if cookie.name == 'user_session':
self._AUTHENTICATED = True
return True
# No authentication to be performed
return True
# Log in