mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-08-30 15:51:47 +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,
|
||||
jwt_decode_hs256,
|
||||
jwt_is_expired,
|
||||
parse_age_limit,
|
||||
try_call,
|
||||
url_or_none,
|
||||
@@ -105,8 +106,9 @@ class JioCinemaBaseIE(InfoExtractor):
|
||||
'os': ('os', {str}),
|
||||
})}, data=data)
|
||||
|
||||
def _is_token_expired(self, token):
|
||||
return self._jwt_is_expired(token, 180)
|
||||
@staticmethod
|
||||
def _is_token_expired(token):
|
||||
return jwt_is_expired(token, 180)
|
||||
|
||||
def _perform_login(self, username, password):
|
||||
if self._ACCESS_TOKEN and not self._is_token_expired(self._ACCESS_TOKEN):
|
||||
|
||||
Reference in New Issue
Block a user