1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-07-27 07:38:30 +00:00

[ie/hotstar] Fix error handling (#13793)

Fix 7e0af2b1f0

Closes #13790
Authored by: bashonly
This commit is contained in:
bashonly 2025-07-21 14:09:52 -05:00 committed by GitHub
parent 3e49bc8a1b
commit ef103b2d11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,6 +42,7 @@ class HotStarBaseIE(InfoExtractor):
} }
def _has_active_subscription(self, cookies, server_time): def _has_active_subscription(self, cookies, server_time):
server_time = int_or_none(server_time) or int(time.time())
expiry = traverse_obj(cookies, ( expiry = traverse_obj(cookies, (
self._TOKEN_NAME, 'value', {jwt_decode_hs256}, 'sub', {json.loads}, self._TOKEN_NAME, 'value', {jwt_decode_hs256}, 'sub', {json.loads},
'subscriptions', 'in', ..., 'expiry', {parse_iso8601}, all, {max})) or 0 'subscriptions', 'in', ..., 'expiry', {parse_iso8601}, all, {max})) or 0