aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dlc/extractor/brightcove.py
diff options
context:
space:
mode:
authorTom-Oliver Heidel <github@tom-oliver.eu>2020-10-31 09:35:00 +0100
committerGitHub <noreply@github.com>2020-10-31 09:35:00 +0100
commitcf37b9f875037f03a63b51ec88c9a2eac6e868d9 (patch)
tree42e89884cf0b057775b10275eacb87d5f7b3d83b /youtube_dlc/extractor/brightcove.py
parent587ceadc8f19aa3c0846d8ee9974e0e3e264e268 (diff)
parent7fb5f2f29d99fa269988c6586558c7e9d21e432d (diff)
downloadhypervideo-pre-cf37b9f875037f03a63b51ec88c9a2eac6e868d9.tar.lz
hypervideo-pre-cf37b9f875037f03a63b51ec88c9a2eac6e868d9.tar.xz
hypervideo-pre-cf37b9f875037f03a63b51ec88c9a2eac6e868d9.zip
Merge pull request #74 from blackjack4494/master
Release 2020.10.31
Diffstat (limited to 'youtube_dlc/extractor/brightcove.py')
-rw-r--r--youtube_dlc/extractor/brightcove.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/youtube_dlc/extractor/brightcove.py b/youtube_dlc/extractor/brightcove.py
index 2aa9f4782..638673c31 100644
--- a/youtube_dlc/extractor/brightcove.py
+++ b/youtube_dlc/extractor/brightcove.py
@@ -471,12 +471,17 @@ class BrightcoveNewIE(AdobePassIE):
title = json_data['name'].strip()
formats = []
+ sources_num = len(json_data.get('sources'))
+ key_systems_present = 0
for source in json_data.get('sources', []):
container = source.get('container')
ext = mimetype2ext(source.get('type'))
src = source.get('src')
- # https://support.brightcove.com/playback-api-video-fields-reference#key_systems_object
- if ext == 'ism' or container == 'WVM' or source.get('key_systems'):
+ # https://apis.support.brightcove.com/playback/references/playback-api-video-fields-reference.html
+ if source.get('key_systems'):
+ key_systems_present += 1
+ continue
+ elif ext == 'ism' or container == 'WVM':
continue
elif ext == 'm3u8' or container == 'M2TS':
if not src:
@@ -533,6 +538,10 @@ class BrightcoveNewIE(AdobePassIE):
'format_id': build_format_id('rtmp'),
})
formats.append(f)
+
+ if sources_num == key_systems_present:
+ raise ExtractorError('This video is DRM protected', expected=True)
+
if not formats:
# for sonyliv.com DRM protected videos
s3_source_url = json_data.get('custom_fields', {}).get('s3sourceurl')