]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/malemotion.py
8c1966ab25e5215ab96286822d50507aa25ea58d
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',
20 'skip': 'This video has been deleted.'
23 def _real_extract(self
, url
):
24 mobj
= re
.match(self
._VALID
_URL
, url
)
25 video_id
= mobj
.group("id")
27 webpage
= self
._download
_webpage
(url
, video_id
)
29 self
.report_extraction(video_id
)
32 video_url
= compat_urllib_parse
.unquote(
33 self
._search
_regex
(r
'<source type="video/mp4" src="(.+?)"', webpage
, 'video URL'))
36 video_title
= self
._html
_search
_regex
(
37 r
'<title>(.*?)</title', webpage
, 'title')
39 # Extract video thumbnail
40 video_thumbnail
= self
._search
_regex
(
41 r
'<video .+?poster="(.+?)"', webpage
, 'thumbnail', fatal
=False)
56 'thumbnail': video_thumbnail
,