1 from __future__ import unicode_literals
6 from .common import InfoExtractor
12 'a': 'h', 'd': 'e', 'e': 'v', 'f': 'o', 'g': 'f', 'i': 'd', 'l': 'n',
13 'm': 'a', 'n': 'm', 'p': 'u', 'q': 't', 'r': 's', 'v': 'p', 'x': 'r',
15 '$': ':', '&': '.', '(': '=', '^': '&', '=': '/',
19 class CliphunterIE(InfoExtractor):
20 IE_NAME = 'cliphunter'
22 _VALID_URL = r'''(?x)http://(?:www\.)?cliphunter\.com/w/
24 (?P<seo>.+?)(?:$|[#\?])
27 'url': 'http://www.cliphunter.com/w/1012420/Fun_Jynx_Maze_solo',
28 'file': '1012420.flv',
29 'md5': '15e7740f30428abf70f4223478dc1225',
31 'title': 'Fun Jynx Maze solo',
35 def _real_extract(self, url):
36 mobj = re.match(self._VALID_URL, url)
37 video_id = mobj.group('id')
39 webpage = self._download_webpage(url, video_id)
41 pl_fiji = self._search_regex(
42 r'pl_fiji = \'([^\']+)\'', webpage, 'video data')
43 pl_c_qual = self._search_regex(
44 r'pl_c_qual = "(.)"', webpage, 'video quality')
45 video_title = self._search_regex(
46 r'mediaTitle = "([^"]+)"', webpage, 'title')
48 video_url = ''.join(translation_table.get(c, c) for c in pl_fiji)
52 'format_id': pl_c_qual,