aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsepro <4618135+seproDev@users.noreply.github.com>2023-11-18 22:51:18 +0100
committerGitHub <noreply@github.com>2023-11-18 21:51:18 +0000
commitddb2d7588bea48bae965dbfabe6df6550c9d3d43 (patch)
treee37567078fb945af2e3294755ce1d3d4254b2267
parentf223b1b0789f65e06619dcc9fc9e74f50d259379 (diff)
[ie] Extract from `media` elements in SMIL manifests (#8504)
Authored by: seproDev
-rw-r--r--yt_dlp/extractor/common.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index b3a45b3fb..507ef34cf 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -2341,7 +2341,9 @@ class InfoExtractor:
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: