From e7e8e4b4453ffb7b3d1a9d78dce1b61bc65d33d5 Mon Sep 17 00:00:00 2001 From: FA Date: Sat, 27 Apr 2019 17:57:43 -0700 Subject: [PATCH] [earthcam] Add new extractor --- youtube_dl/extractor/earthcam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/earthcam.py b/youtube_dl/extractor/earthcam.py index 2488cbef5..0c82c7ee0 100644 --- a/youtube_dl/extractor/earthcam.py +++ b/youtube_dl/extractor/earthcam.py @@ -28,7 +28,7 @@ class EarthCamIE(InfoExtractor): def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) - json_str = self._search_regex(r'var\s+json_base\s*=\s*(?P{\s*"cam"\s*:\s*{.*}.*});', webpage, 'jstr') + json_str = self._html_search_regex(r'var\s+json_base\s*=\s*(?P{\s*"cam"\s*:\s*{.*}.*});', webpage, 'json', group='jstr') json_base = self._parse_json(json_str, video_id) video_info = try_get(json_base, lambda x: x['cam'][video_id], dict) or {} title = video_info.get("long_title")