1
0
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:
Michaël De Boey
2025-03-16 23:26:14 +01:00
parent 5ffedda327
commit 98a68be9b8
6 changed files with 13 additions and 10 deletions

View File

@@ -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]