mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-09 12:50:23 -05:00
minor fixes
This commit is contained in:
parent
07a6e8d6f8
commit
f413b6a487
1 changed files with 3 additions and 3 deletions
|
@ -181,7 +181,7 @@ def _niconico_get_token_by_cookies(self, redirect_url):
|
||||||
urlh = self._ie._request_webpage(
|
urlh = self._ie._request_webpage(
|
||||||
redirect_url, None, note='Getting niconico auth status',
|
redirect_url, None, note='Getting niconico auth status',
|
||||||
expected_status=404, errnote='Unable to get niconico auth status')
|
expected_status=404, errnote='Unable to get niconico auth status')
|
||||||
if not urlh.url.startswith(f'https://{self._DOMAIN}/login'):
|
if not urlh.url.startswith(f'https://{self._ie._DOMAIN}/login'):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if not (sns_login_code := traverse_obj(parse_qs(urlh.url), ('code', 0))):
|
if not (sns_login_code := traverse_obj(parse_qs(urlh.url), ('code', 0))):
|
||||||
|
@ -245,7 +245,7 @@ def _niconico_login(self, mail_tel, password):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _auth0_login(self):
|
def _auth0_login(self):
|
||||||
self._auth_info = {'login_method': 'password', 'auth_type': AuthType.AUTH0}
|
self._auth_info = {'login_method': 'password', 'auth_type': AuthType.OAUTH_AUTH0}
|
||||||
username, password = self._ie._get_login_info()
|
username, password = self._ie._get_login_info()
|
||||||
if not username:
|
if not username:
|
||||||
return
|
return
|
||||||
|
@ -358,7 +358,7 @@ def random_str():
|
||||||
'refresh_token': refresh_token,
|
'refresh_token': refresh_token,
|
||||||
}
|
}
|
||||||
|
|
||||||
self._ie.cache.store(self._NETRC_MACHINE, cache_key, {cache_name: refresh_token})
|
self._ie.cache.store(self._ie._NETRC_MACHINE, cache_key, {cache_name: refresh_token})
|
||||||
|
|
||||||
|
|
||||||
class SheetaEmbedIE(InfoExtractor):
|
class SheetaEmbedIE(InfoExtractor):
|
||||||
|
|
Loading…
Reference in a new issue