mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-24 00:49:06 +00:00
move _jwt_is_expired to utils
This commit is contained in:
@@ -69,7 +69,6 @@ from ..utils import (
|
||||
int_or_none,
|
||||
join_nonempty,
|
||||
js_to_json,
|
||||
jwt_decode_hs256,
|
||||
mimetype2ext,
|
||||
netrc_from_content,
|
||||
orderedSet,
|
||||
@@ -995,10 +994,6 @@ class InfoExtractor:
|
||||
|
||||
return encoding
|
||||
|
||||
@staticmethod
|
||||
def _jwt_is_expired(token, buffer=300):
|
||||
return jwt_decode_hs256(token)['exp'] - time.time() < buffer
|
||||
|
||||
def __check_blocked(self, content):
|
||||
first_block = content[:512]
|
||||
if ('<title>Access to this site is blocked</title>' in content
|
||||
|
||||
Reference in New Issue
Block a user