1 from __future__ import unicode_literals
3 from .common import InfoExtractor
4 from .youtube import YoutubeIE
7 class WimpIE(InfoExtractor):
8 _VALID_URL = r'http://(?:www\.)?wimp\.com/(?P<id>[^/]+)/'
10 'url': 'http://www.wimp.com/maruexhausted/',
11 'md5': 'ee21217ffd66d058e8b16be340b74883',
13 'id': 'maruexhausted',
15 'title': 'Maru is exhausted.',
16 'description': 'md5:57e099e857c0a4ea312542b684a869b8',
19 'url': 'http://www.wimp.com/clowncar/',
20 'md5': '4e2986c793694b55b37cf92521d12bb4',
24 'title': 'It\'s like a clown car.',
25 'description': 'md5:0e56db1370a6e49c5c1d19124c0d2fb2',
29 def _real_extract(self, url):
30 video_id = self._match_id(url)
31 webpage = self._download_webpage(url, video_id)
32 video_url = self._search_regex(
33 [r"[\"']file[\"']\s*[:,]\s*[\"'](.+?)[\"']", r"videoId\s*:\s*[\"']([^\"']+)[\"']"],
35 if YoutubeIE.suitable(video_url):
36 self.to_screen('Found YouTube video')
40 'ie_key': YoutubeIE.ie_key(),
46 'title': self._og_search_title(webpage),
47 'thumbnail': self._og_search_thumbnail(webpage),
48 'description': self._og_search_description(webpage),