]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/slutload.py
18cc7721e142c7493bbebdfcb59f621e3fedaf4f
   1 from __future__ 
import unicode_literals
 
   3 from .common 
import InfoExtractor
 
   6 class SlutloadIE(InfoExtractor
): 
   7     _VALID_URL 
= r
'^https?://(?:\w+\.)?slutload\.com/video/[^/]+/(?P<id>[^/]+)/?$' 
   9         'url': 'http://www.slutload.com/video/virginie-baisee-en-cam/TD73btpBqSxc/', 
  10         'md5': '868309628ba00fd488cf516a113fd717', 
  14             'title': 'virginie baisee en cam', 
  16             'thumbnail': 're:https?://.*?\.jpg' 
  20     def _real_extract(self
, url
): 
  21         video_id 
= self
._match
_id
(url
) 
  22         webpage 
= self
._download
_webpage
(url
, video_id
) 
  24         video_title 
= self
._html
_search
_regex
(r
'<h1><strong>([^<]+)</strong>', 
  25                                               webpage
, 'title').strip() 
  27         video_url 
= self
._html
_search
_regex
( 
  28             r
'(?s)<div id="vidPlayer"\s+data-url="([^"]+)"', 
  30         thumbnail 
= self
._html
_search
_regex
( 
  31             r
'(?s)<div id="vidPlayer"\s+.*?previewer-file="([^"]+)"', 
  32             webpage
, 'thumbnail', fatal
=False) 
  38             'thumbnail': thumbnail
,