1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-02 21:56:06 +08:00

Update vidzi.py

This commit is contained in:
Sergey M 2018-06-16 05:08:01 +07:00 committed by GitHub
parent ba976d6f99
commit ee98dc7ee9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,8 +53,9 @@ class VidziIE(InfoExtractor):
jwplayer_data = self._parse_json(
self._search_regex(
r'setup\(([^)]+)\)', code, 'jwplayer data',
default=NO_DEFAULT if num == len(codes) else '{}').replace('+ window[\'vastRef\']', ''),
video_id, transform_source=js_to_json)
default=NO_DEFAULT if num == len(codes) else '{}'),
video_id, transform_source=lambda s: js_to_json(
re.sub(r'\s*\+\s*window\[.+?\]', '', s)))
if jwplayer_data:
break