2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
5 from ..compat
import compat_urllib_parse_unquote
8 class MalemotionIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://malemotion\.com/video/(.+?)\.(?P<id>.+?)(#|$)'
11 'url': 'http://malemotion.com/video/bete-de-concours.ltc',
12 'md5': '3013e53a0afbde2878bc39998c33e8a5',
16 'title': 'Bête de Concours',
21 def _real_extract(self
, url
):
22 video_id
= self
._match
_id
(url
)
23 webpage
= self
._download
_webpage
(url
, video_id
)
25 video_url
= compat_urllib_parse_unquote(self
._search
_regex
(
26 r
'<source type="video/mp4" src="(.+?)"', webpage
, 'video URL'))
27 video_title
= self
._html
_search
_regex
(
28 r
'<title>(.*?)</title', webpage
, 'title')
29 video_thumbnail
= self
._search
_regex
(
30 r
'<video .+?poster="(.+?)"', webpage
, 'thumbnail', fatal
=False)
38 self
._sort
_formats
(formats
)
44 'thumbnail': video_thumbnail
,