1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-29 21:57:50 +00:00

[hotstar] Add extractor args to ignore tags (#2116)

Authored by: Ashish0804
This commit is contained in:
Ashish Gupta
2022-01-01 02:32:23 +05:30
committed by GitHub
parent 3464a2727b
commit 26f2aa3db9
2 changed files with 8 additions and 0 deletions

View File

@@ -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: