diff options
author | bashonly <bashonly@bashonly.com> | 2023-08-31 15:45:11 -0500 |
---|---|---|
committer | bashonly <bashonly@bashonly.com> | 2023-08-31 15:45:11 -0500 |
commit | 30ea88591b728cca0896018dbf67c2298070c669 (patch) | |
tree | 80df1fc1151b1efaf95e3e0ed8486fc73e6c7b1c | |
parent | 630a55df8de7747e79aa680959d785dfff2c4b76 (diff) | |
download | hypervideo-pre-30ea88591b728cca0896018dbf67c2298070c669.tar.lz hypervideo-pre-30ea88591b728cca0896018dbf67c2298070c669.tar.xz hypervideo-pre-30ea88591b728cca0896018dbf67c2298070c669.zip |
[ie/hotstar] Make metadata extraction non-fatal
Authored by: bashonly
-rw-r--r-- | yt_dlp/extractor/hotstar.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/yt_dlp/extractor/hotstar.py b/yt_dlp/extractor/hotstar.py index cdd937941..6cadfb5b7 100644 --- a/yt_dlp/extractor/hotstar.py +++ b/yt_dlp/extractor/hotstar.py @@ -200,8 +200,10 @@ class HotStarIE(HotStarBaseIE): video_type = self._TYPE.get(video_type, video_type) cookies = self._get_cookies(url) # Cookies before any request - video_data = self._call_api_v1(f'{video_type}/detail', video_id, - query={'tas': 10000, 'contentId': video_id})['body']['results']['item'] + video_data = traverse_obj( + self._call_api_v1( + f'{video_type}/detail', video_id, fatal=False, query={'tas': 10000, 'contentId': video_id}), + ('body', 'results', 'item', {dict})) or {} if not self.get_param('allow_unplayable_formats') and video_data.get('drmProtected'): self.report_drm(video_id) |