mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[WDR] use _download_json with a strip_jsonp
This commit is contained in:
parent
3874e6ea66
commit
37f972954d
1 changed files with 3 additions and 3 deletions
|
@ -9,6 +9,7 @@
|
|||
compat_urlparse,
|
||||
)
|
||||
from ..utils import (
|
||||
strip_jsonp,
|
||||
unified_strdate,
|
||||
ExtractorError,
|
||||
)
|
||||
|
@ -112,9 +113,8 @@ def _real_extract(self, url):
|
|||
|
||||
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']
|
||||
|
|
Loading…
Reference in a new issue