From efbbe76a637beb4f1d1548cd67806ab9f186be2f Mon Sep 17 00:00:00 2001 From: Oneboy1979 Date: Sat, 11 Apr 2020 20:30:29 +0200 Subject: [PATCH] PlaywrGlobalWien - add support for hader player --- youtube_dl/extractor/playerglobewien.py | 28 ++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/playerglobewien.py b/youtube_dl/extractor/playerglobewien.py index 3f348c810..df614334c 100755 --- a/youtube_dl/extractor/playerglobewien.py +++ b/youtube_dl/extractor/playerglobewien.py @@ -6,7 +6,7 @@ from .common import InfoExtractor class PlayerGlobeWienIE(InfoExtractor): - _VALID_URL = r'https?://player.globe.wien/globe-wien/(?P.*)' + _VALID_URL = r'https?://player.(globe.wien|hader.at)/(globe-wien|hader)/(?P.*)' _TESTS = [ { 'url': 'https://player.globe.wien/globe-wien/corona-podcast-teil-4', @@ -29,7 +29,29 @@ class PlayerGlobeWienIE(InfoExtractor): 'params': { 'format': 'bestaudio', } - } + }, + { + 'url': 'https://player.hader.at/hader/hader-indien-video', + 'info_dict': { + 'id': 'hader-indien-video', + 'ext': 'mp4', + 'title': 'Film der Woche - Indien', + }, + 'params': { + 'format': 'bestvideo', + } + }, + { + 'url': 'https://player.hader.at/hader/hader-indien-video', + 'info_dict': { + 'id': 'hader-indien-video', + 'ext': 'mp4', + 'title': 'Film der Woche - Indien', + }, + 'params': { + 'format': 'bestaudio', + } + }, ] def _real_extract(self, url): @@ -38,7 +60,7 @@ class PlayerGlobeWienIE(InfoExtractor): webpage = self._download_webpage(url, video_id) formats = [] title = self._html_search_regex(r'(.+?)', webpage, 'title') - title = re.sub(r'^Globe Wien VOD -\s*', '', title) + title = re.sub(r'^(Globe Wien VOD -|Hader VOD -)\s*', '', title) stream_url = self._download_webpage("https://player.globe.wien/api/playout?vodId=" + video_id, video_id)