mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-24 00:49:06 +00:00
add buffer argument to _jwt_is_expired
This commit is contained in:
@@ -996,8 +996,8 @@ class InfoExtractor:
|
||||
return encoding
|
||||
|
||||
@staticmethod
|
||||
def _jwt_is_expired(token):
|
||||
return jwt_decode_hs256(token)['exp'] - time.time() < 300
|
||||
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]
|
||||
|
||||
Reference in New Issue
Block a user