aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-03-27 07:42:38 +0600
committerSergey M․ <dstftw@gmail.com>2016-03-27 07:42:38 +0600
commitb22ca76204e1a05e1c4b07d24cb6a0dbbc09d18e (patch)
tree14b01ae65dadcb60e77de011b9b297c8e76cf928 /youtube_dl
parentf7df343b4a0223698f0a5320b850410d7a42be6f (diff)
[extractor/common] Filter out unsupported encrypted media for f4m formats (Closes #8573)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/common.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 40ddf175c..9b7ab8924 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -24,6 +24,7 @@ from ..compat import (
compat_urllib_parse_urlencode,
compat_urlparse,
)
+from ..downloader.f4m import remove_encrypted_media
from ..utils import (
NO_DEFAULT,
age_restricted,
@@ -989,6 +990,11 @@ class InfoExtractor(object):
if not media_nodes:
manifest_version = '2.0'
media_nodes = manifest.findall('{http://ns.adobe.com/f4m/2.0}media')
+ # Remove unsupported DRM protected media from final formats
+ # rendition (see https://github.com/rg3/youtube-dl/issues/8573).
+ media_nodes = remove_encrypted_media(media_nodes)
+ if not media_nodes:
+ return formats
base_url = xpath_text(
manifest, ['{http://ns.adobe.com/f4m/1.0}baseURL', '{http://ns.adobe.com/f4m/2.0}baseURL'],
'base URL', default=None)