]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/malemotion.py
0b85a59d1c644d7d04e573aae0bdd03ebd4f6c80
   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
,