3 from .common import InfoExtractor
6 class WimpIE(InfoExtractor):
7 _VALID_URL = r'(?:http://)?(?:www\.)?wimp\.com/([^/]+)/'
9 def _real_extract(self, url):
10 mobj = re.match(self._VALID_URL, url)
11 video_id = mobj.group(1)
12 webpage = self._download_webpage(url, video_id)
13 title = self._search_regex('\<meta name\="description" content="(.+?)" \/\>',webpage, 'video title')
14 thumbnail_url = self._search_regex('\<meta property\=\"og\:image" content\=\"(.+?)\" />',webpage,'video thumbnail')
15 googleString = self._search_regex("googleCode = '(.*?)'", webpage,'file url')
16 googleString = base64.b64decode(googleString)
17 final_url = self._search_regex('","(.*?)"', googleString,'final video url')
18 ext = final_url.split('.')[-1]
24 'thumbnail': thumbnail_url,