1 from __future__ import unicode_literals
5 from .common import InfoExtractor
10 class MalemotionIE(InfoExtractor):
11 _VALID_URL = r'^(?:https?://)?malemotion\.com/video/(.+?)\.(?P<id>.+?)(#|$)'
13 'url': 'http://malemotion.com/video/bien-dur.10ew',
15 'md5': 'b3cc49f953b107e4a363cdff07d100ce',
22 def _real_extract(self, url):
23 mobj = re.match(self._VALID_URL, url)
24 video_id = mobj.group("id")
26 webpage = self._download_webpage(url, video_id)
28 self.report_extraction(video_id)
31 video_url = compat_urllib_parse.unquote(
32 self._search_regex(r'<source type="video/mp4" src="(.+?)"', webpage, 'video URL'))
35 video_title = self._html_search_regex(
36 r'<title>(.*?)</title', webpage, 'title')
38 # Extract video thumbnail
39 video_thumbnail = self._search_regex(
40 r'<video .+?poster="(.+?)"', webpage, 'thumbnail', fatal=False)
55 'thumbnail': video_thumbnail,