]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/clipfish.py
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
,