aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/hotstar.py
diff options
context:
space:
mode:
authorAshish Gupta <39122144+Ashish0804@users.noreply.github.com>2022-01-01 02:32:23 +0530
committerGitHub <noreply@github.com>2022-01-01 02:32:23 +0530
commit26f2aa3db96cf44764d69b32db78b7a48752a016 (patch)
tree820d251838dd941c2a6eca2bcea12d1945b91b7d /yt_dlp/extractor/hotstar.py
parent3464a2727bc3a0465ed21ea5c37f3e78ed8797d2 (diff)
downloadhypervideo-pre-26f2aa3db96cf44764d69b32db78b7a48752a016.tar.lz
hypervideo-pre-26f2aa3db96cf44764d69b32db78b7a48752a016.tar.xz
hypervideo-pre-26f2aa3db96cf44764d69b32db78b7a48752a016.zip
[hotstar] Add extractor args to ignore tags (#2116)
Authored by: Ashish0804
Diffstat (limited to 'yt_dlp/extractor/hotstar.py')
-rw-r--r--yt_dlp/extractor/hotstar.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/yt_dlp/extractor/hotstar.py b/yt_dlp/extractor/hotstar.py
index de2b30cf7..a0ce1f10a 100644
--- a/yt_dlp/extractor/hotstar.py
+++ b/yt_dlp/extractor/hotstar.py
@@ -203,6 +203,9 @@ class HotStarIE(HotStarBaseIE):
format_url = re.sub(
r'(?<=//staragvod)(\d)', r'web\1', format_url)
tags = str_or_none(playback_set.get('tagsCombination')) or ''
+ ingored_res, ignored_vcodec, ignored_dr = self._configuration_arg('res'), self._configuration_arg('vcodec'), self._configuration_arg('dr')
+ if any(f'resolution:{ig_res}' in tags for ig_res in ingored_res) or any(f'video_codec:{ig_vc}' in tags for ig_vc in ignored_vcodec) or any(f'dynamic_range:{ig_dr}' in tags for ig_dr in ignored_dr):
+ continue
ext = determine_ext(format_url)
current_formats, current_subs = [], {}
try: