move _jwt_is_expired to utils

This commit is contained in:
Michaël De Boey
2025-03-16 23:40:50 +01:00
parent 98a68be9b8
commit 1b1117a9c5
12 changed files with 32 additions and 22 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ from .common import InfoExtractor
from ..utils import (
ExtractorError,
int_or_none,
jwt_is_expired,
str_or_none,
traverse_obj,
try_call,
@@ -114,7 +115,7 @@ class QDanceIE(InfoExtractor):
self.raise_login_required()
def _get_auth(self):
if self._jwt_is_expired(self._access_token, 120):
if jwt_is_expired(self._access_token, 120):
if not self._refresh_token:
raise ExtractorError(
'Cannot refresh access token, login with yt-dlp or refresh cookies in browser')