1
0
Fork 0
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:
Mozi 2025-02-04 17:15:09 +00:00
parent 07a6e8d6f8
commit f413b6a487

View file

@ -181,7 +181,7 @@ def _niconico_get_token_by_cookies(self, redirect_url):
urlh = self._ie._request_webpage(
redirect_url, None, note='Getting 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
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
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()
if not username:
return
@ -358,7 +358,7 @@ def random_str():
'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):