]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/vidzi.py
2 from __future__
import unicode_literals
4 from .jwplatform
import JWPlatformBaseIE
11 class VidziIE(JWPlatformBaseIE
):
12 _VALID_URL
= r
'https?://(?:www\.)?vidzi\.tv/(?:embed-)?(?P<id>[0-9a-zA-Z]+)'
14 'url': 'http://vidzi.tv/cghql9yq6emu.html',
15 'md5': '4f16c71ca0c8c8635ab6932b5f3f1660',
19 'title': 'youtube-dl test video 1\\\\2\'3/4<5\\\\6ä7↭',
23 'skip_download': True,
26 'url': 'http://vidzi.tv/embed-4z2yb0rzphe9-600x338.html',
27 'skip_download': True,
30 def _real_extract(self
, url
):
31 video_id
= self
._match
_id
(url
)
33 webpage
= self
._download
_webpage
(
34 'http://vidzi.tv/%s' % video_id
, video_id
)
35 title
= self
._html
_search
_regex
(
36 r
'(?s)<h2 class="video-title">(.*?)</h2>', webpage
, 'title')
38 code
= decode_packed_codes(webpage
).replace('\\\'', '\'')
39 jwplayer_data
= self
._parse
_json
(
40 self
._search
_regex
(r
'setup\(([^)]+)\)', code
, 'jwplayer data'),
41 video_id
, transform_source
=js_to_json
)
43 info_dict
= self
._parse
_jwplayer
_data
(jwplayer_data
, video_id
, require_title
=False)
44 info_dict
['title'] = title