From 7fe09be17bef818d9735b02ad1784ac76b646952 Mon Sep 17 00:00:00 2001 From: kenavera Date: Fri, 30 Mar 2018 10:08:46 +0200 Subject: [PATCH 1/2] Fix regex for video id --- 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 f8c30052f..48edbb93e 100644 --- a/youtube_dl/extractor/medialaan.py +++ b/youtube_dl/extractor/medialaan.py @@ -140,7 +140,7 @@ class MedialaanIE(GigyaBaseIE): '\\\\', '\\').replace(r'\"', '"').replace(r"\'", "'")) vod_id = config.get('vodId') or self._search_regex( - (r'\\"vodId\\"\s*:\s*\\"(.+?)\\"', + (r'\"vodId\"\s*:\s*\"(.+?)\"', r'<[^>]+id=["\']vod-(\d+)'), webpage, 'video_id', default=None) From 8966a60bfb56043519ea5f9aacad225bc4dbc5c3 Mon Sep 17 00:00:00 2001 From: kenavera Date: Sat, 31 Mar 2018 16:56:40 +0200 Subject: [PATCH 2/2] fix requested changes --- youtube_dl/extractor/medialaan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/medialaan.py b/youtube_dl/extractor/medialaan.py index 48edbb93e..50d5db802 100644 --- a/youtube_dl/extractor/medialaan.py +++ b/youtube_dl/extractor/medialaan.py @@ -140,7 +140,8 @@ class MedialaanIE(GigyaBaseIE): '\\\\', '\\').replace(r'\"', '"').replace(r"\'", "'")) vod_id = config.get('vodId') or self._search_regex( - (r'\"vodId\"\s*:\s*\"(.+?)\"', + (r'\\"vodId\\"\s*:\s*\\"(.+?)\\"', + r'"vodId"\s*:\s*"(.+?)"', r'<[^>]+id=["\']vod-(\d+)'), webpage, 'video_id', default=None)