From 143d400f7e7a310e71549d75ffd68bdd1a0d3222 Mon Sep 17 00:00:00 2001 From: Alexandre Huot Date: Fri, 21 Dec 2018 17:49:17 -0500 Subject: [PATCH 1/5] [radiocanada] Relax DRM check --- youtube_dl/extractor/radiocanada.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/radiocanada.py b/youtube_dl/extractor/radiocanada.py index b952e59b4..e6ec5d2cc 100644 --- a/youtube_dl/extractor/radiocanada.py +++ b/youtube_dl/extractor/radiocanada.py @@ -67,8 +67,10 @@ class RadioCanadaIE(InfoExtractor): el = find_xpath_attr(metadata, './/Meta', 'name', name) return el.text if el is not None else None + # IsDrm does not necessarily mean the video is DRM protected (see + # https://github.com/rg3/youtube-dl/issues/13994). if get_meta('protectionType'): - raise ExtractorError('This video is DRM protected.', expected=True) + self.report_warning('This video is probably DRM protected.') device_types = ['ipad'] if not smuggled_data: From f01d91831e899c63239669e70325dde6bbb3c4b2 Mon Sep 17 00:00:00 2001 From: Alexandre Huot Date: Tue, 1 Jan 2019 20:20:07 -0500 Subject: [PATCH 2/5] [radiocanada] Add test for DRM check --- youtube_dl/extractor/radiocanada.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/youtube_dl/extractor/radiocanada.py b/youtube_dl/extractor/radiocanada.py index e6ec5d2cc..cc2fd9261 100644 --- a/youtube_dl/extractor/radiocanada.py +++ b/youtube_dl/extractor/radiocanada.py @@ -49,6 +49,14 @@ class RadioCanadaIE(InfoExtractor): # m3u8 download 'skip_download': True, }, + }, + { + 'url': 'radiocanada:toutv:140872', + 'info_dict': { + 'id': '140872', + 'title': 'Épisode 1', + 'series': 'District 31' + } } ] From ecb92e3720e9ed9b2efa9f8a97c03c88a0cbfcd9 Mon Sep 17 00:00:00 2001 From: Alexandre Huot Date: Wed, 2 Jan 2019 18:11:03 -0500 Subject: [PATCH 3/5] [radiocanada] Corrections after PR review --- youtube_dl/extractor/radiocanada.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/radiocanada.py b/youtube_dl/extractor/radiocanada.py index cc2fd9261..148dbea1d 100644 --- a/youtube_dl/extractor/radiocanada.py +++ b/youtube_dl/extractor/radiocanada.py @@ -51,12 +51,14 @@ class RadioCanadaIE(InfoExtractor): }, }, { + # url from toutv that triggers false DRM validation 'url': 'radiocanada:toutv:140872', 'info_dict': { 'id': '140872', 'title': 'Épisode 1', - 'series': 'District 31' - } + 'series': 'District 31', + }, + 'only_matching': True, } ] @@ -75,7 +77,7 @@ class RadioCanadaIE(InfoExtractor): el = find_xpath_attr(metadata, './/Meta', 'name', name) return el.text if el is not None else None - # IsDrm does not necessarily mean the video is DRM protected (see + # protectionType does not necessarily mean the video is DRM protected (see # https://github.com/rg3/youtube-dl/issues/13994). if get_meta('protectionType'): self.report_warning('This video is probably DRM protected.') From 85669e09358a3ca16274105bb4d169de561927b1 Mon Sep 17 00:00:00 2001 From: Sergey M Date: Sun, 20 Jan 2019 18:28:36 +0700 Subject: [PATCH 4/5] Update radiocanada.py --- youtube_dl/extractor/radiocanada.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/radiocanada.py b/youtube_dl/extractor/radiocanada.py index 148dbea1d..fbc5bc98f 100644 --- a/youtube_dl/extractor/radiocanada.py +++ b/youtube_dl/extractor/radiocanada.py @@ -78,7 +78,7 @@ class RadioCanadaIE(InfoExtractor): return el.text if el is not None else None # protectionType does not necessarily mean the video is DRM protected (see - # https://github.com/rg3/youtube-dl/issues/13994). + # https://github.com/rg3/youtube-dl/pull/18609). if get_meta('protectionType'): self.report_warning('This video is probably DRM protected.') From 4bcc6e837d55d3dc55884e6c38556a8f7e561a5f Mon Sep 17 00:00:00 2001 From: Sergey M Date: Sun, 20 Jan 2019 18:31:47 +0700 Subject: [PATCH 5/5] Update radiocanada.py --- youtube_dl/extractor/radiocanada.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/radiocanada.py b/youtube_dl/extractor/radiocanada.py index fbc5bc98f..302f67d96 100644 --- a/youtube_dl/extractor/radiocanada.py +++ b/youtube_dl/extractor/radiocanada.py @@ -51,7 +51,7 @@ class RadioCanadaIE(InfoExtractor): }, }, { - # url from toutv that triggers false DRM validation + # with protectionType but not actually DRM protected 'url': 'radiocanada:toutv:140872', 'info_dict': { 'id': '140872',