1 from __future__ import unicode_literals
5 from .common import InfoExtractor
15 class ClipfishIE(InfoExtractor):
16 _VALID_URL = r'https?://(?:www\.)?clipfish\.de/(?:[^/]+/)+video/(?P<id>[0-9]+)'
18 'url': 'http://www.clipfish.de/special/game-trailer/video/3966754/fifa-14-e3-2013-trailer/',
19 'md5': '79bc922f3e8a9097b3d68a93780fd475',
23 'title': 'FIFA 14 - E3 2013 Trailer',
24 'timestamp': 1370938118,
25 'upload_date': '20130611',
30 def _real_extract(self, url):
31 video_id = self._match_id(url)
33 webpage = self._download_webpage(url, video_id)
35 video_info = self._parse_json(
36 js_to_json(self._html_search_regex(
37 '(?s)videoObject\s*=\s*({.+?});', webpage, 'video object')),
41 for video_url in re.findall(r'var\s+videourl\s*=\s*"([^"]+)"', webpage):
42 ext = determine_ext(video_url)
45 'url': video_url.replace('de.hls.fra.clipfish.de', 'hls.fra.clipfish.de'),
54 self._sort_formats(formats)
56 title = remove_end(self._og_search_title(webpage), ' - Video')
57 thumbnail = self._og_search_thumbnail(webpage)
58 duration = int_or_none(video_info.get('length'))
59 timestamp = parse_iso8601(self._html_search_meta('uploadDate', webpage, 'upload date'))
65 'thumbnail': thumbnail,
67 'timestamp': timestamp,