1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-07-23 21:58:29 +00:00

[ie/hotstar] Improve error handling

Authored by: bashonly
This commit is contained in:
bashonly 2025-07-14 00:59:12 -05:00
parent d57a0b5aa7
commit ce2c6a696d
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0

View File

@ -383,10 +383,13 @@ def _real_extract(self, url):
formats.extend(current_formats)
subs = self._merge_subtitles(subs, current_subs)
if not formats and geo_restricted:
self.raise_geo_restricted(countries=['IN'], metadata_available=True)
elif not formats and has_drm:
self.report_drm(video_id)
if not formats:
if geo_restricted:
self.raise_geo_restricted(countries=['IN'], metadata_available=True)
elif has_drm:
self.report_drm(video_id)
elif not self._has_active_subscription(cookies, st):
self.raise_no_formats('Your account does not have access to this content', expected=True)
self._remove_duplicate_formats(formats)
for f in formats:
f.setdefault('http_headers', {}).update(headers)