From 5879f7d64f55bdac36a1a10f6a5fd39802ab26ca Mon Sep 17 00:00:00 2001 From: Alexander Seiler Date: Fri, 23 Nov 2018 10:25:28 +0100 Subject: [PATCH 1/2] [joj] Fix extraction (closes #18280) --- youtube_dl/extractor/joj.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/joj.py b/youtube_dl/extractor/joj.py index d9f8dbfd2..9034e1039 100644 --- a/youtube_dl/extractor/joj.py +++ b/youtube_dl/extractor/joj.py @@ -29,6 +29,15 @@ class JojIE(InfoExtractor): 'thumbnail': r're:^https?://.*\.jpg$', 'duration': 3118, } + }, { + 'url': 'https://media.joj.sk/embed/1a2dokc', + 'info_dict': { + 'id': '1a2dokc', + 'ext': 'mp4', + 'title': 'SOM MAMA', + 'thumbnail': r're:^https?://.*\.jpg$', + 'duration': 2401, + } }, { 'url': 'https://media.joj.sk/embed/9i1cxv', 'only_matching': True, @@ -61,7 +70,7 @@ class JojIE(InfoExtractor): bitrates = self._parse_json( self._search_regex( - r'(?s)bitrates\s*=\s*({.+?});', webpage, 'bitrates', + r'(?s)(?:bitrates|var\s+src)\s*=\s*({.+?});', webpage, 'bitrates', default='{}'), video_id, transform_source=js_to_json, fatal=False) From 0b3a74d71142707414794ecda1bd68e91d9dc150 Mon Sep 17 00:00:00 2001 From: Sergey M Date: Sat, 24 Nov 2018 22:13:42 +0700 Subject: [PATCH 2/2] Update joj.py --- youtube_dl/extractor/joj.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/youtube_dl/extractor/joj.py b/youtube_dl/extractor/joj.py index 9034e1039..62b28e980 100644 --- a/youtube_dl/extractor/joj.py +++ b/youtube_dl/extractor/joj.py @@ -29,15 +29,6 @@ class JojIE(InfoExtractor): 'thumbnail': r're:^https?://.*\.jpg$', 'duration': 3118, } - }, { - 'url': 'https://media.joj.sk/embed/1a2dokc', - 'info_dict': { - 'id': '1a2dokc', - 'ext': 'mp4', - 'title': 'SOM MAMA', - 'thumbnail': r're:^https?://.*\.jpg$', - 'duration': 2401, - } }, { 'url': 'https://media.joj.sk/embed/9i1cxv', 'only_matching': True, @@ -70,7 +61,7 @@ class JojIE(InfoExtractor): bitrates = self._parse_json( self._search_regex( - r'(?s)(?:bitrates|var\s+src)\s*=\s*({.+?});', webpage, 'bitrates', + r'(?s)(?:src|bitrates)\s*=\s*({.+?});', webpage, 'bitrates', default='{}'), video_id, transform_source=js_to_json, fatal=False)