Browse Source

[watchbox] Fix extraction (closes #16904)

master-ytdl-org
Sergey M․ 7 years ago
parent
commit
1ed0b2f74d
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      youtube_dl/extractor/watchbox.py

+ 4
- 3
youtube_dl/extractor/watchbox.py View File

@ -67,11 +67,12 @@ class WatchBoxIE(InfoExtractor):
webpage = self._download_webpage(url, video_id)
source = self._parse_json(
source = (self._parse_json(
self._search_regex(
r'(?s)source["\']?\s*:\s*({.+?})\s*[,}]', webpage, 'source',
r'playerConf\s*=\s*({.+?})\s*;', webpage, 'player config',
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)


Loading…
Cancel
Save