mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-08-29 07:11:38 +03:00
move _jwt_is_expired to utils
This commit is contained in:
@@ -11,6 +11,7 @@ from ..utils import (
|
||||
float_or_none,
|
||||
int_or_none,
|
||||
js_to_json,
|
||||
jwt_is_expired,
|
||||
mimetype2ext,
|
||||
orderedSet,
|
||||
parse_age_limit,
|
||||
@@ -653,7 +654,7 @@ class CBCGemIE(CBCGemBaseIE):
|
||||
raise
|
||||
|
||||
def _fetch_access_token(self):
|
||||
if self._jwt_is_expired(self._access_token):
|
||||
if jwt_is_expired(self._access_token):
|
||||
try:
|
||||
self._call_oauth_api({
|
||||
'grant_type': 'refresh_token',
|
||||
@@ -671,7 +672,7 @@ class CBCGemIE(CBCGemBaseIE):
|
||||
if not self._get_login_info()[0]:
|
||||
return None
|
||||
|
||||
if not self._claims_token or self._jwt_is_expired(self._claims_token):
|
||||
if not self._claims_token or jwt_is_expired(self._claims_token):
|
||||
self._claims_token = self._download_json(
|
||||
'https://services.radio-canada.ca/ott/subscription/v2/gem/Subscriber/profile',
|
||||
None, 'Downloading claims token', query={'device': 'web'},
|
||||
|
||||
Reference in New Issue
Block a user