diff options
author | Boris Wachtmeister <boris-code@gmx.com> | 2016-05-26 16:59:45 +0200 |
---|---|---|
committer | Boris Wachtmeister <boris-code@gmx.com> | 2016-05-26 20:54:51 +0200 |
commit | 37f972954da0d0f1f0c5e97da8357c4baf687ee6 (patch) | |
tree | 3485b706c5b035de89b63e8419c87a5b27133b82 /youtube_dl/extractor/wdr.py | |
parent | 3874e6ea66c738910c6a1065b2d781e04a8143ae (diff) |
[WDR] use _download_json with a strip_jsonp
Diffstat (limited to 'youtube_dl/extractor/wdr.py')
-rw-r--r-- | youtube_dl/extractor/wdr.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/extractor/wdr.py b/youtube_dl/extractor/wdr.py index 05bfe7deb..73a343c69 100644 --- a/youtube_dl/extractor/wdr.py +++ b/youtube_dl/extractor/wdr.py @@ -9,6 +9,7 @@ from ..compat import ( compat_urlparse, ) from ..utils import ( + strip_jsonp, unified_strdate, ExtractorError, ) @@ -112,9 +113,8 @@ class WDRIE(InfoExtractor): raise ExtractorError('No downloadable streams found', expected=True) - js_data = self._download_webpage(js_url, 'metadata') - json_data = self._search_regex(r'\(({.*})\)', js_data, 'json') - metadata = self._parse_json(json_data, display_id) + metadata = self._download_json( + js_url, 'metadata', transform_source=strip_jsonp) metadata_tracker_data = metadata['trackerData'] metadata_media_resource = metadata['mediaResource'] |