]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/vzaar.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
11 class VzaarIE(InfoExtractor
):
12 _VALID_URL
= r
'https?://(?:(?:www|view)\.)?vzaar\.com/(?:videos/)?(?P<id>\d+)'
14 'url': 'https://vzaar.com/videos/1152805',
15 'md5': 'bde5ddfeb104a6c56a93a06b04901dbf',
19 'title': 'sample video (public)',
22 'url': 'https://view.vzaar.com/27272/player',
23 'md5': '3b50012ac9bbce7f445550d54e0508f2',
31 def _real_extract(self
, url
):
32 video_id
= self
._match
_id
(url
)
33 video_data
= self
._download
_json
(
34 'http://view.vzaar.com/v2/%s/video' % video_id
, video_id
)
35 source_url
= video_data
['sourceUrl']
39 'title': video_data
['videoTitle'],
41 'thumbnail': self
._proto
_relative
_url
(video_data
.get('poster')),
42 'duration': float_or_none(video_data
.get('videoDuration')),
44 if 'audio' in source_url
:
51 'width': int_or_none(video_data
.get('width')),
52 'height': int_or_none(video_data
.get('height')),