mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[watchbox] Fix extraction (closes #16904)
This commit is contained in:
parent
e15141adae
commit
1ed0b2f74d
1 changed files with 4 additions and 3 deletions
|
@ -67,11 +67,12 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
source = self._parse_json(
|
source = (self._parse_json(
|
||||||
self._search_regex(
|
self._search_regex(
|
||||||
r'(?s)source["\']?\s*:\s*({.+?})\s*[,}]', webpage, 'source',
|
r'playerConf\s*=\s*({.+?})\s*;', webpage, 'player config',
|
||||||
default='{}'),
|
default='{}'),
|
||||||
video_id, transform_source=js_to_json, fatal=False) or {}
|
video_id, transform_source=js_to_json,
|
||||||
|
fatal=False) or {}).get('source') or {}
|
||||||
|
|
||||||
video_id = compat_str(source.get('videoId') or video_id)
|
video_id = compat_str(source.get('videoId') or video_id)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue