]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/cliphunter.py
1 from __future__
import unicode_literals
5 from .common
import InfoExtractor
9 'a': 'h', 'd': 'e', 'e': 'v', 'f': 'o', 'g': 'f', 'i': 'd', 'l': 'n',
10 'm': 'a', 'n': 'm', 'p': 'u', 'q': 't', 'r': 's', 'v': 'p', 'x': 'r',
12 '$': ':', '&': '.', '(': '=', '^': '&', '=': '/',
16 class CliphunterIE(InfoExtractor
):
17 IE_NAME
= 'cliphunter'
19 _VALID_URL
= r
'''(?x)http://(?:www\.)?cliphunter\.com/w/
21 (?P<seo>.+?)(?:$|[#\?])
24 'url': 'http://www.cliphunter.com/w/1012420/Fun_Jynx_Maze_solo',
25 'file': '1012420.flv',
26 'md5': '15e7740f30428abf70f4223478dc1225',
28 'title': 'Fun Jynx Maze solo',
32 def _real_extract(self
, url
):
33 mobj
= re
.match(self
._VALID
_URL
, url
)
34 video_id
= mobj
.group('id')
36 webpage
= self
._download
_webpage
(url
, video_id
)
38 pl_fiji
= self
._search
_regex
(
39 r
'pl_fiji = \'([^
\']+)\'', webpage, 'video data
')
40 pl_c_qual = self._search_regex(
41 r'pl_c_qual
= "(.)"', webpage, 'video quality
')
42 video_title = self._search_regex(
43 r'mediaTitle
= "([^"]+)"', webpage, 'title')
45 video_url = ''.join(translation_table.get(c, c) for c in pl_fiji)
49 'format_id': pl_c_qual,