From 3e88025e7bc3a7ec81daabe2b3286d6821f4d84d Mon Sep 17 00:00:00 2001 From: "Wayne A. Ptaff" Date: Sun, 22 Sep 2019 09:35:09 -0400 Subject: [PATCH 1/2] [telequebec] Support coucou subdomain URLs The zonevideo.telequebec.tv code works on coucou.telequebec.tv, so just ensure those coucou URLs are recognized. --- youtube_dl/extractor/telequebec.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/telequebec.py b/youtube_dl/extractor/telequebec.py index 6965c127b..906704b9c 100644 --- a/youtube_dl/extractor/telequebec.py +++ b/youtube_dl/extractor/telequebec.py @@ -22,7 +22,7 @@ class TeleQuebecBaseIE(InfoExtractor): class TeleQuebecIE(TeleQuebecBaseIE): - _VALID_URL = r'https?://zonevideo\.telequebec\.tv/media/(?P\d+)' + _VALID_URL = r'https?://(?:coucou|zonevideo)\.telequebec\.tv/(?:media|videos)/(?P\d+)' _TESTS = [{ # available till 01.01.2023 'url': 'http://zonevideo.telequebec.tv/media/37578/un-petit-choc-et-puis-repart/un-chef-a-la-cabane', @@ -41,6 +41,20 @@ class TeleQuebecIE(TeleQuebecBaseIE): # no description 'url': 'http://zonevideo.telequebec.tv/media/30261', 'only_matching': True, + }, { + # coucou variant + 'url': 'https://coucou.telequebec.tv/videos/41788/idee-de-genie/l-heure-du-bain', + 'info_dict': { + 'id': '350796a9f4ca4010a8fd51e418dc3449', + 'ext': 'mp4', + 'title': 'L\'heure du bain', + 'description': 'md5:d41d8cd98f00b204e9800998ecf8427e', + 'upload_date': '20181108', + 'timestamp': 1541705154, + }, + 'params': { + 'skip_download': True, + }, }] def _real_extract(self, url): From e372f616586fd1616124d2e420d2e898ee19cce8 Mon Sep 17 00:00:00 2001 From: Sergey M Date: Fri, 4 Oct 2019 19:11:46 +0700 Subject: [PATCH 2/2] Update telequebec.py --- youtube_dl/extractor/telequebec.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/youtube_dl/extractor/telequebec.py b/youtube_dl/extractor/telequebec.py index 906704b9c..911385d01 100644 --- a/youtube_dl/extractor/telequebec.py +++ b/youtube_dl/extractor/telequebec.py @@ -22,7 +22,13 @@ class TeleQuebecBaseIE(InfoExtractor): class TeleQuebecIE(TeleQuebecBaseIE): - _VALID_URL = r'https?://(?:coucou|zonevideo)\.telequebec\.tv/(?:media|videos)/(?P\d+)' + _VALID_URL = r'''(?x) + https?:// + (?: + zonevideo\.telequebec\.tv/media| + coucou\.telequebec\.tv/videos + )/(?P\d+) + ''' _TESTS = [{ # available till 01.01.2023 'url': 'http://zonevideo.telequebec.tv/media/37578/un-petit-choc-et-puis-repart/un-chef-a-la-cabane', @@ -42,19 +48,8 @@ class TeleQuebecIE(TeleQuebecBaseIE): 'url': 'http://zonevideo.telequebec.tv/media/30261', 'only_matching': True, }, { - # coucou variant 'url': 'https://coucou.telequebec.tv/videos/41788/idee-de-genie/l-heure-du-bain', - 'info_dict': { - 'id': '350796a9f4ca4010a8fd51e418dc3449', - 'ext': 'mp4', - 'title': 'L\'heure du bain', - 'description': 'md5:d41d8cd98f00b204e9800998ecf8427e', - 'upload_date': '20181108', - 'timestamp': 1541705154, - }, - 'params': { - 'skip_download': True, - }, + 'only_matching': True, }] def _real_extract(self, url):