From a6c0097cc659925b9d58f47548b6b2aec7c5d730 Mon Sep 17 00:00:00 2001 From: midas02 Date: Tue, 18 Apr 2017 05:44:33 +0200 Subject: [PATCH 1/4] Fix broken videos A rough trick to get around the two different json styles medialaan seems to be using. Fix for these example videos: https://vtmkzoom.be/video?aid=45724 https://vtmkzoom.be/video?aid=45425 --- youtube_dl/extractor/medialaan.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/youtube_dl/extractor/medialaan.py b/youtube_dl/extractor/medialaan.py index 6e067474b..9834ab9c9 100644 --- a/youtube_dl/extractor/medialaan.py +++ b/youtube_dl/extractor/medialaan.py @@ -146,6 +146,8 @@ class MedialaanIE(InfoExtractor): video_id, transform_source=lambda s: '[%s]' % s, fatal=False) if player: video = player[-1] + if video['videoUrl'] == "https": + return self.url_result(video['url'], 'Medialaan') info = { 'id': video_id, 'url': video['videoUrl'], From fb827585e1be393af8f5a4ecaf8e2480d19cd915 Mon Sep 17 00:00:00 2001 From: midas02 Date: Thu, 20 Apr 2017 01:29:17 +0200 Subject: [PATCH 2/4] Enable downloads from the nieuws.vtm.be domain --- youtube_dl/extractor/medialaan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/medialaan.py b/youtube_dl/extractor/medialaan.py index 9834ab9c9..f6e02e974 100644 --- a/youtube_dl/extractor/medialaan.py +++ b/youtube_dl/extractor/medialaan.py @@ -17,7 +17,7 @@ from ..utils import ( class MedialaanIE(InfoExtractor): _VALID_URL = r'''(?x) https?:// - (?:www\.)? + (?:www\.|nieuws\.)? (?: (?Pvtm|q2|vtmkzoom)\.be/ (?: From 3c3969beb1d5ac6dc31e9dde8ad14f5dd955c477 Mon Sep 17 00:00:00 2001 From: midas02 Date: Mon, 24 Apr 2017 19:36:12 +0200 Subject: [PATCH 3/4] Fixes --- youtube_dl/extractor/medialaan.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/medialaan.py b/youtube_dl/extractor/medialaan.py index f6e02e974..93e68c0c3 100644 --- a/youtube_dl/extractor/medialaan.py +++ b/youtube_dl/extractor/medialaan.py @@ -85,6 +85,22 @@ class MedialaanIE(InfoExtractor): # clip 'url': 'http://vtmkzoom.be/k3-dansstudio/een-nieuw-seizoen-van-k3-dansstudio', 'only_matching': True, + }, { + # http/s redirect + 'url': 'https://vtmkzoom.be/video?aid=45724', + 'info_dict': { + 'id': '257136373657000', + 'ext': 'mp4', + 'title': 'K3 Dansstudio Ushuaia afl.6', + }, + 'params': { + 'skip_download': True, + }, + 'skip': 'Requires account credentials', + }, { + # nieuws.vtm.be + 'url': 'https://nieuws.vtm.be/stadion/stadion/genk-nog-moeilijk-programma', + 'only_matching': True, }] def _real_initialize(self): @@ -146,8 +162,8 @@ class MedialaanIE(InfoExtractor): video_id, transform_source=lambda s: '[%s]' % s, fatal=False) if player: video = player[-1] - if video['videoUrl'] == "https": - return self.url_result(video['url'], 'Medialaan') + if video['videoUrl'] in ('http','https'): + return self.url_result(video['url'], MedialaanIE.ie_key()) info = { 'id': video_id, 'url': video['videoUrl'], From ed110ce3b272f68e37dcdd836d4fea75323514a2 Mon Sep 17 00:00:00 2001 From: midas02 Date: Tue, 9 May 2017 20:00:36 +0200 Subject: [PATCH 4/4] Some syntax fixes --- youtube_dl/extractor/medialaan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/medialaan.py b/youtube_dl/extractor/medialaan.py index 93e68c0c3..fc8f2550b 100644 --- a/youtube_dl/extractor/medialaan.py +++ b/youtube_dl/extractor/medialaan.py @@ -162,7 +162,7 @@ class MedialaanIE(InfoExtractor): video_id, transform_source=lambda s: '[%s]' % s, fatal=False) if player: video = player[-1] - if video['videoUrl'] in ('http','https'): + if video['videoUrl'] in ('http', 'https'): return self.url_result(video['url'], MedialaanIE.ie_key()) info = { 'id': video_id,