]> jfr.im git - yt-dlp.git/commitdiff
[ie] Extract from `media` elements in SMIL manifests (#8504)
authorsepro <redacted>
Sat, 18 Nov 2023 21:51:18 +0000 (22:51 +0100)
committerGitHub <redacted>
Sat, 18 Nov 2023 21:51:18 +0000 (21:51 +0000)
Authored by: seproDev

yt_dlp/extractor/common.py

index b3a45b3fb578b85d30fac977ed2b8ec82088d059..507ef34cf56c1647430cb64023f1157ed6947bca 100644 (file)
@@ -2341,7 +2341,9 @@ def _parse_smil_formats_and_subtitles(
         imgs_count = 0
 
         srcs = set()
-        media = smil.findall(self._xpath_ns('.//video', namespace)) + smil.findall(self._xpath_ns('.//audio', namespace))
+        media = itertools.chain.from_iterable(
+            smil.findall(self._xpath_ns(arg, namespace))
+            for arg in ['.//video', './/audio', './/media'])
         for medium in media:
             src = medium.get('src')
             if not src or src in srcs: