]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/clipfish.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
10 class ClipfishIE(InfoExtractor
):
11 _VALID_URL
= r
'https?://(?:www\.)?clipfish\.de/(?:[^/]+/)+video/(?P<id>[0-9]+)'
13 'url': 'http://www.clipfish.de/special/game-trailer/video/3966754/fifa-14-e3-2013-trailer/',
14 'md5': '79bc922f3e8a9097b3d68a93780fd475',
18 'title': 'FIFA 14 - E3 2013 Trailer',
19 'description': 'Video zu FIFA 14: E3 2013 Trailer',
20 'upload_date': '20130611',
26 def _real_extract(self
, url
):
27 video_id
= self
._match
_id
(url
)
29 video_info
= self
._download
_json
(
30 'http://www.clipfish.de/devapi/id/%s?format=json&apikey=hbbtv' % video_id
,
35 m3u8_url
= video_info
.get('media_videourl_hls')
38 'url': m3u8_url
.replace('de.hls.fra.clipfish.de', 'hls.fra.clipfish.de'),
43 mp4_url
= video_info
.get('media_videourl')
48 'width': int_or_none(video_info
.get('width')),
49 'height': int_or_none(video_info
.get('height')),
50 'tbr': int_or_none(video_info
.get('bitrate')),
55 'title': video_info
['title'],
56 'description': video_info
.get('descr'),
58 'thumbnail': video_info
.get('media_content_thumbnail_large') or video_info
.get('media_thumbnail'),
59 'duration': int_or_none(video_info
.get('media_length')),
60 'upload_date': unified_strdate(video_info
.get('pubDate')),
61 'view_count': int_or_none(video_info
.get('media_views'))