diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-09-24 04:09:03 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-09-24 05:14:18 +0530 |
commit | 8f70b0b82f4b8d0c9f40ff60893ffc8601b3dab6 (patch) | |
tree | 935367d25ecb8db610e859ffe6b1d7982e5e3f9a /yt_dlp/extractor/cbs.py | |
parent | be867b03f56b53892d55e573502713b20b88bec1 (diff) | |
download | hypervideo-pre-8f70b0b82f4b8d0c9f40ff60893ffc8601b3dab6.tar.lz hypervideo-pre-8f70b0b82f4b8d0c9f40ff60893ffc8601b3dab6.tar.xz hypervideo-pre-8f70b0b82f4b8d0c9f40ff60893ffc8601b3dab6.zip |
[cbs] Report appropriate error for DRM
Closes #1056
Diffstat (limited to 'yt_dlp/extractor/cbs.py')
-rw-r--r-- | yt_dlp/extractor/cbs.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/yt_dlp/extractor/cbs.py b/yt_dlp/extractor/cbs.py index ed5dc84a7..ae9ce5862 100644 --- a/yt_dlp/extractor/cbs.py +++ b/yt_dlp/extractor/cbs.py @@ -130,6 +130,7 @@ class CBSIE(CBSBaseIE): title = xpath_text(video_data, 'videoTitle', 'title') or xpath_text(video_data, 'videotitle', 'title') asset_types = {} + has_drm = False for item in items_data.findall('.//item'): asset_type = xpath_text(item, 'assetType') query = { @@ -144,6 +145,8 @@ class CBSIE(CBSBaseIE): if asset_type in asset_types: continue elif any(excluded in asset_type for excluded in ('HLS_FPS', 'DASH_CENC', 'OnceURL')): + if 'DASH_CENC' in asset_type: + has_drm = True continue if asset_type.startswith('HLS') or 'StreamPack' in asset_type: query['formats'] = 'MPEG4,M3U' @@ -151,6 +154,9 @@ class CBSIE(CBSBaseIE): query['formats'] = 'MPEG4,FLV' asset_types[asset_type] = query + if not asset_types and has_drm: + self.report_drm(content_id) + return self._extract_common_video_info(content_id, asset_types, mpx_acc, extra_info={ 'title': title, 'series': xpath_text(video_data, 'seriesTitle'), |