mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-10 23:42:53 +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):
|
def _login(self):
|
||||||
(username, password) = self._get_login_info()
|
(username, password) = self._get_login_info()
|
||||||
# No authentication to be performed
|
|
||||||
if not username:
|
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
|
return True
|
||||||
|
|
||||||
# Log in
|
# Log in
|
||||||
|
Loading…
Reference in New Issue
Block a user