2 from __future__ import unicode_literals
4 from .common import InfoExtractor
10 class MalemotionIE(InfoExtractor):
11 _VALID_URL = r'https?://malemotion\.com/video/(.+?)\.(?P<id>.+?)(#|$)'
13 'url': 'http://malemotion.com/video/bete-de-concours.ltc',
14 'md5': '3013e53a0afbde2878bc39998c33e8a5',
18 'title': 'BĂȘte de Concours',
23 def _real_extract(self, url):
24 video_id = self._match_id(url)
25 webpage = self._download_webpage(url, video_id)
27 video_url = compat_urllib_parse.unquote(self._search_regex(
28 r'<source type="video/mp4" src="(.+?)"', webpage, 'video URL'))
29 video_title = self._html_search_regex(
30 r'<title>(.*?)</title', webpage, 'title')
31 video_thumbnail = self._search_regex(
32 r'<video .+?poster="(.+?)"', webpage, 'thumbnail', fatal=False)
40 self._sort_formats(formats)
46 'thumbnail': video_thumbnail,