mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 03:10:38 +00:00
[ie/hotstar] Make metadata extraction non-fatal
Authored by: bashonly
This commit is contained in:
parent
630a55df8d
commit
30ea88591b
@ -200,8 +200,10 @@ class HotStarIE(HotStarBaseIE):
|
|||||||
video_type = self._TYPE.get(video_type, video_type)
|
video_type = self._TYPE.get(video_type, video_type)
|
||||||
cookies = self._get_cookies(url) # Cookies before any request
|
cookies = self._get_cookies(url) # Cookies before any request
|
||||||
|
|
||||||
video_data = self._call_api_v1(f'{video_type}/detail', video_id,
|
video_data = traverse_obj(
|
||||||
query={'tas': 10000, 'contentId': video_id})['body']['results']['item']
|
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'):
|
if not self.get_param('allow_unplayable_formats') and video_data.get('drmProtected'):
|
||||||
self.report_drm(video_id)
|
self.report_drm(video_id)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user