[ie] Extract from media elements in SMIL manifests (#8504)

Authored by: seproDev
This commit is contained in:
sepro 2023-11-18 22:51:18 +01:00 committed by GitHub
parent f223b1b078
commit ddb2d7588b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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