mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-01-07 14:41:51 +00:00
[extractor/echo360] use _search_json instead of _parse_json as recommended by @pukkandan
This commit is contained in:
parent
9e2f1ecc38
commit
32fc35d305
1 changed files with 2 additions and 3 deletions
|
@ -101,9 +101,8 @@ def _real_extract(self, url):
|
|||
host, video_id = self._match_valid_url(url).group('host', 'id')
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
|
||||
player_config = self._parse_json(self._search_regex(
|
||||
r'Echo\["mediaPlayerBootstrapApp"\]\("({[^}]*})"\);', webpage, 'player config').replace('\\"', "\""),
|
||||
video_id)
|
||||
player_config = self._search_json(r'Echo\["mediaPlayerBootstrapApp"\]\("', webpage, 'player config', video_id,
|
||||
transform_source=lambda x: x.replace(R'\"', '"'))
|
||||
|
||||
urlh = self._request_webpage(
|
||||
f'https://{host}/api/ui/sessions/{player_config["sessionId"]}',
|
||||
|
|
Loading…
Reference in a new issue