1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-12-23 16:38:57 +00:00

move _jwt_is_expired to utils

This commit is contained in:
Michaël De Boey
2025-03-16 23:37:39 +01:00
parent 98a68be9b8
commit 1b1117a9c5
12 changed files with 32 additions and 22 deletions

View File

@@ -8,6 +8,7 @@ from ..dependencies import Cryptodome
from ..utils import (
ExtractorError,
int_or_none,
jwt_is_expired,
traverse_obj,
try_call,
url_basename,
@@ -43,7 +44,7 @@ class WrestleUniverseBaseIE(InfoExtractor):
self.raise_login_required()
self._TOKEN = token
if not self._REAL_TOKEN or self._jwt_is_expired(self._REAL_TOKEN):
if not self._REAL_TOKEN or jwt_is_expired(self._REAL_TOKEN):
if not self._REFRESH_TOKEN:
raise ExtractorError(
'Expired token. Refresh your cookies in browser and try again', expected=True)