[vidzi] Fix extraction (closes #16678)
authorUrgau <lolo.branstett@numericable.fr>
Fri, 15 Jun 2018 22:08:44 +0000 (00:08 +0200)
committerSergey M <dstftw@gmail.com>
Fri, 15 Jun 2018 22:08:44 +0000 (05:08 +0700)
youtube_dl/extractor/vidzi.py

index 9026e778cfb108462c5fdfa5ca2a42d166dc37a7..d70283479ae18c5c01b0c5caba75ad0e3392698f 100644 (file)
@@ -54,7 +54,8 @@ class VidziIE(InfoExtractor):
                 self._search_regex(
                     r'setup\(([^)]+)\)', code, 'jwplayer data',
                     default=NO_DEFAULT if num == len(codes) else '{}'),
-                video_id, transform_source=js_to_json)
+                video_id, transform_source=lambda s: js_to_json(
+                    re.sub(r'\s*\+\s*window\[.+?\]', '', s)))
             if jwplayer_data:
                 break