]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/hentaistigma.py
   1 from __future__ 
import unicode_literals
 
   5 from .common 
import InfoExtractor
 
   8 class HentaiStigmaIE(InfoExtractor
): 
   9     _VALID_URL 
= r
'^https?://hentai\.animestigma\.com/(?P<id>[^/]+)' 
  11         'url': 'http://hentai.animestigma.com/inyouchuu-etsu-bonus/', 
  12         'md5': '4e3d07422a68a4cc363d8f57c8bf0d23', 
  14             'id': 'inyouchuu-etsu-bonus', 
  16             "title": "Inyouchuu Etsu Bonus", 
  21     def _real_extract(self
, url
): 
  22         mobj 
= re
.match(self
._VALID
_URL
, url
) 
  23         video_id 
= mobj
.group('id') 
  25         webpage 
= self
._download
_webpage
(url
, video_id
) 
  27         title 
= self
._html
_search
_regex
( 
  28             r
'<h2 class="posttitle"><a[^>]*>([^<]+)</a>', 
  30         wrap_url 
= self
._html
_search
_regex
( 
  31             r
'<iframe src="([^"]+mp4)"', webpage
, 'wrapper url') 
  32         wrap_webpage 
= self
._download
_webpage
(wrap_url
, video_id
) 
  34         video_url 
= self
._html
_search
_regex
( 
  35             r
'clip:\s*{\s*url: "([^"]*)"', wrap_webpage
, 'video url')