diff options
author | Tithen-Firion <Tithen-Firion@users.noreply.github.com> | 2017-05-04 11:00:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-04 11:00:06 +0200 |
commit | c89267d31ad99eb5b1a87cd354de5280a2a087b1 (patch) | |
tree | 8bb3b01cd088d0646089344bddd3d4ff272c0065 /youtube_dl/extractor/vidzi.py | |
parent | 7552f96352f35cd877e52fd0770b77ba1856fc62 (diff) | |
parent | 0c265486016b06342fb257966474ce591667aaff (diff) | |
download | youtube-dl-c89267d31ad99eb5b1a87cd354de5280a2a087b1.tar.xz |
Merge branch 'master' into openload-phantomjs-method
Diffstat (limited to 'youtube_dl/extractor/vidzi.py')
-rw-r--r-- | youtube_dl/extractor/vidzi.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/youtube_dl/extractor/vidzi.py b/youtube_dl/extractor/vidzi.py index d0556297e..e64873bce 100644 --- a/youtube_dl/extractor/vidzi.py +++ b/youtube_dl/extractor/vidzi.py @@ -42,14 +42,15 @@ class VidziIE(InfoExtractor): title = self._html_search_regex( r'(?s)<h2 class="video-title">(.*?)</h2>', webpage, 'title') - packed_codes = [mobj.group(0) for mobj in re.finditer( - PACKED_CODES_RE, webpage)] - for num, pc in enumerate(packed_codes, 1): - code = decode_packed_codes(pc).replace('\\\'', '\'') + codes = [webpage] + codes.extend([ + decode_packed_codes(mobj.group(0)).replace('\\\'', '\'') + for mobj in re.finditer(PACKED_CODES_RE, webpage)]) + for num, code in enumerate(codes, 1): jwplayer_data = self._parse_json( self._search_regex( r'setup\(([^)]+)\)', code, 'jwplayer data', - default=NO_DEFAULT if num == len(packed_codes) else '{}'), + default=NO_DEFAULT if num == len(codes) else '{}'), video_id, transform_source=js_to_json) if jwplayer_data: break |