From 2804216e81de31ea33f65de3881f68f28ae54a59 Mon Sep 17 00:00:00 2001 From: dirkf Date: Fri, 22 Jul 2022 15:54:30 +0100 Subject: [PATCH] Improve fallback --- youtube_dl/extractor/megacartoons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/megacartoons.py b/youtube_dl/extractor/megacartoons.py index 672bccbdd..c6186e3f8 100644 --- a/youtube_dl/extractor/megacartoons.py +++ b/youtube_dl/extractor/megacartoons.py @@ -83,7 +83,7 @@ class MegaCartoonsIE(InfoExtractor): if 'url' not in info or 'thumbnail' not in info: # Video data is stored in a json -> extract it from the raw html - url_json = self._parse_json(self._html_search_regex(r''']+\bdata-item\s*=\s*(["'])(?P\{.*})\1''', webpage, 'videourls', group='videourls', default='{}'), video_id, fatal=False)) or {} + url_json = self._parse_json(self._html_search_regex(r''']+\bdata-item\s*=\s*(["'])(?P\{.*})\1''', webpage, 'videourls', group='videourls', default='{}'), video_id, fatal=False) or {} video_url = url_or_none(try_get(url_json, lambda x: x['sources'][0]['src'], compat_str) or self._og_search_video_url(webpage)) # Get the video url video_thumbnail = url_or_none(url_json.get('splash') or self._og_search_thumbnail(webpage)) # Get the thumbnail