]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/unistra.py
   3 from .common 
import InfoExtractor
 
   5 class UnistraIE(InfoExtractor
): 
   6     _VALID_URL 
= r
'http://utv\.unistra\.fr/(?:index|video)\.php\?id_video\=(\d+)' 
   9         u
'url': u
'http://utv.unistra.fr/video.php?id_video=154', 
  11         u
'md5': u
'736f605cfdc96724d55bb543ab3ced24', 
  13             u
'title': u
'M!ss Yella', 
  14             u
'description': u
'md5:104892c71bd48e55d70b902736b81bbf', 
  18     def _real_extract(self
, url
): 
  19         id = re
.match(self
._VALID
_URL
, url
).group(1) 
  20         webpage 
= self
._download
_webpage
(url
, id) 
  21         file = re
.search(r
'file: "(.*?)",', webpage
).group(1) 
  22         title 
= self
._html
_search
_regex
(r
'<title>UTV - (.*?)</', webpage
, u
'title') 
  24         video_url 
= 'http://vod-flash.u-strasbg.fr:8080/' + file 
  30                 'description': self
._html
_search
_regex
(r
'<meta name="Description" content="(.*?)"', webpage
, u
'description', flags
=re
.DOTALL
), 
  31                 'thumbnail': self
._search
_regex
(r
'image: "(.*?)"', webpage
, u
'thumbnail'),