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:
parent
60427f63d1
commit
c98ff70f1f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user