diff --git a/youtube_dl/extractor/megacartoons.py b/youtube_dl/extractor/megacartoons.py index ea6161b7b..672bccbdd 100644 --- a/youtube_dl/extractor/megacartoons.py +++ b/youtube_dl/extractor/megacartoons.py @@ -1,7 +1,6 @@ # coding: utf-8 from __future__ import unicode_literals -import json import re from ..utils import ( @@ -10,8 +9,10 @@ from ..utils import ( merge_dicts, NO_DEFAULT, RegexNotFoundError, + try_get, url_or_none, ) +from ..compat import compat_str from .common import InfoExtractor @@ -82,9 +83,9 @@ 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 = json.loads(self._html_search_regex(r'