From 5f223aaa07156d39d05356e8be237382cc744022 Mon Sep 17 00:00:00 2001 From: enigmaquip Date: Wed, 1 Nov 2017 16:46:12 -0600 Subject: [PATCH 1/2] [TeleQuebec] Add Emissions extractor --- youtube_dl/extractor/telequebec.py | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/youtube_dl/extractor/telequebec.py b/youtube_dl/extractor/telequebec.py index fafaa826f..0505983b8 100644 --- a/youtube_dl/extractor/telequebec.py +++ b/youtube_dl/extractor/telequebec.py @@ -47,3 +47,36 @@ class TeleQuebecIE(InfoExtractor): media_data.get('durationInMilliseconds'), 1000), 'ie_key': 'LimelightMedia', } + +class TeleQuebecEmissionsIE(InfoExtractor): + _VALID_URL = r'https?://[^.\s]+\.telequebec\.tv/emissions/(?P[^/]+)' + _TEST = { + 'url': 'http://lindicemcsween.telequebec.tv/emissions/100430013/des-soins-esthetiques-a-377-d-interets-annuels-ca-vous-tente', + 'info_dict': { + 'id': '66648a6aef914fe3badda25e81a4d50a', + 'ext': 'mp4', + 'title': 'Des soins esth\u00e9tiques \u00e0 377 % d\'int\u00e9r\u00eats annuels, \u00e7a vous tente?', + 'description': 'Certains plans de financement peuvent assassiner votre portefeuille! D\u00e9monstration avec des soins esth\u00e9tiques. Louis T. aime le confort financier, mais n\'a pas h\u00e9sit\u00e9 \u00e0 laisser tomber la s\u00e9curit\u00e9 d\'emploi pour faire ce qu\'il aime le plus au monde. Les gens qui font de l\'argent au noir sont plus riches que les autres, mais ils appauvrissent notre soci\u00e9t\u00e9 et Pierre-Yves rencontre Diane Ch\u00eanevert, qui a utilis\u00e9 toutes ses \u00e9conomies pour fonder un centre d\'aide pour les enfants handicap\u00e9s.', + 'upload_date': '20171024', + 'timestamp': 1508862118, + }, + 'params': { + # m3u8 download + 'skip_download': True, + }, + } + + def _real_extract(self, url): + display_id = self._match_id(url) + webpage = self._download_webpage(url,display_id) + mediauid = self._search_regex(r'mediaUID:[\s]?["\']Limelight_(?P\w+)["\']',webpage,'mediaUID') + return { + '_type': 'url_transparent', + 'id': mediauid, + 'url': smuggle_url( + 'limelight:media:' + mediauid, + {'geo_countries': ['CA']}), + 'title': self._og_search_title(webpage), + 'description': self._og_search_description(webpage), + 'ie_key': 'LimelightMedia', + } From ef3f9898b099149a05d3065d3d566374e773bc83 Mon Sep 17 00:00:00 2001 From: enigmaquip Date: Wed, 1 Nov 2017 16:48:01 -0600 Subject: [PATCH 2/2] Update extractors.py --- youtube_dl/extractor/extractors.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 2eed706f9..271181b2c 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -1024,7 +1024,10 @@ from .telebruxelles import TeleBruxellesIE from .telecinco import TelecincoIE from .telegraaf import TelegraafIE from .telemb import TeleMBIE -from .telequebec import TeleQuebecIE +from .telequebec import ( + TeleQuebecIE, + TeleQuebecEmissionsIE, +) from .teletask import TeleTaskIE from .telewebion import TelewebionIE from .testurl import TestURLIE