2 from __future__ import unicode_literals
6 from .jwplatform import JWPlatformBaseIE
13 class VidziIE(JWPlatformBaseIE):
14 _VALID_URL = r'https?://(?:www\.)?vidzi\.tv/(?P<id>\w+)'
16 'url': 'http://vidzi.tv/cghql9yq6emu.html',
17 'md5': '4f16c71ca0c8c8635ab6932b5f3f1660',
21 'title': 'youtube-dl test video 1\\\\2\'3/4<5\\\\6ä7↭',
25 'skip_download': True,
29 def _real_extract(self, url):
30 video_id = self._match_id(url)
32 webpage = self._download_webpage(url, video_id)
33 title = self._html_search_regex(
34 r'(?s)<h2 class="video-title">(.*?)</h2>', webpage, 'title')
36 mobj = re.search(r"}\('(.+)',36,(\d+),'([^']+)'\.split\('\|'\)", webpage)
37 code, count, symbols = mobj.groups()
40 symbols = symbols.split('|')
45 code = re.sub(r'\b%s\b' % base36(count), symbols[count], code)
47 code = code.replace('\\\'', '\'')
48 jwplayer_data = self._parse_json(
49 self._search_regex(r'setup\(([^)]+)\)', code, 'jwplayer data'),
50 video_id, transform_source=js_to_json)
52 info_dict = self._parse_jwplayer_data(jwplayer_data, video_id, require_title=False)
53 info_dict['title'] = title