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

Fix 7e0af2b1f0

Closes #13790
Authored by: bashonly
pull/13799/head
bashonly 5 days ago committed by GitHub
parent 3e49bc8a1b
commit ef103b2d11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save