Skip to content

A feature-rich command-line audio/video downloader

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

bashonlyef103b2d115b
diff --git a/yt_dlp/extractor/hotstar.py b/yt_dlp/extractor/hotstar.py
index b280fb53ab..2ae527a59e 100644
--- a/yt_dlp/extractor/hotstar.py
+++ b/yt_dlp/extractor/hotstar.py
@@ -42,6 +42,7 @@ class HotStarBaseIE(InfoExtractor):
}
def _has_active_subscription(self, cookies, server_time):
+ server_time = int_or_none(server_time) or int(time.time())
expiry = traverse_obj(cookies, (
self._TOKEN_NAME, 'value', {jwt_decode_hs256}, 'sub', {json.loads},
'subscriptions', 'in', ..., 'expiry', {parse_iso8601}, all, {max})) or 0