mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-23 00:18:55 +00:00
refactor: extract common _is_jwt_token_expired to InfoExtractor
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import time
|
||||
|
||||
from .wrestleuniverse import WrestleUniverseBaseIE
|
||||
from ..utils import (
|
||||
int_or_none,
|
||||
@@ -22,7 +20,7 @@ class StacommuBaseIE(WrestleUniverseBaseIE):
|
||||
|
||||
@WrestleUniverseBaseIE._TOKEN.getter
|
||||
def _TOKEN(self):
|
||||
if self._REAL_TOKEN and self._TOKEN_EXPIRY <= int(time.time()):
|
||||
if self._REAL_TOKEN and self._is_jwt_token_expired(self._REAL_TOKEN):
|
||||
self._refresh_token()
|
||||
|
||||
return self._REAL_TOKEN
|
||||
|
||||
Reference in New Issue
Block a user