]>
jfr.im git - yt-dlp.git/blob - youtube_dl/extractor/clipfish.py
1 from __future__
import unicode_literals
5 from .common
import InfoExtractor
12 class ClipfishIE(InfoExtractor
):
13 _VALID_URL
= r
'https?://(?:www\.)?clipfish\.de/(?:[^/]+/)+video/(?P<id>[0-9]+)'
15 'url': 'http://www.clipfish.de/special/game-trailer/video/3966754/fifa-14-e3-2013-trailer/',
16 'md5': '79bc922f3e8a9097b3d68a93780fd475',
20 'title': 'FIFA 14 - E3 2013 Trailer',
21 'description': 'Video zu FIFA 14: E3 2013 Trailer',
22 'upload_date': '20130611',
28 def _real_extract(self
, url
):
29 video_id
= self
._match
_id
(url
)
31 video_info
= self
._download
_json
('http://www.clipfish.de/devapi/id/%s?format=json&apikey=hbbtv' % video_id
, video_id
)['items'][0]
34 'url': video_info
['media_videourl_hls'].replace('de.hls.fra.clipfish.de', 'hls.fra.clipfish.de'),
38 'url': video_info
['media_videourl'],
40 'width': int_or_none(video_info
.get('width')),
41 'height': int_or_none(video_info
.get('height')),
42 'tbr': int_or_none(video_info
.get('bitrate')),
47 'title': video_info
['title'],
48 'description': video_info
.get('descr'),
50 'thumbnail': video_info
.get('media_content_thumbnail_large') or video_info
.get('media_thumbnail'),
51 'duration': int_or_none(video_info
.get('media_length')),
52 'upload_date': unified_strdate(video_info
.get('pubDate')),
53 'view_count': int_or_none(video_info
.get('media_views'))