]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/scivee.py
55a481cc0ed41fa0bef33f3af1bce941fa7659a1
   1 from __future__ 
import unicode_literals
 
   5 from .common 
import InfoExtractor
 
   6 from ..utils 
import int_or_none
 
   9 class SciVeeIE(InfoExtractor
): 
  10     _VALID_URL 
= r
'https?://(?:www\.)?scivee\.tv/node/(?P<id>\d+)' 
  13         'url': 'http://www.scivee.tv/node/62352', 
  14         'md5': 'b16699b74c9e6a120f6772a44960304f', 
  18             'title': 'Adam Arkin at the 2014 DOE JGI Genomics of Energy & Environment Meeting', 
  19             'description': 'md5:81f1710638e11a481358fab1b11059d7', 
  23     def _real_extract(self
, url
): 
  24         mobj 
= re
.match(self
._VALID
_URL
, url
) 
  25         video_id 
= mobj
.group('id') 
  27         # annotations XML is malformed 
  28         annotations 
= self
._download
_webpage
( 
  29             'http://www.scivee.tv/assets/annotations/%s' % video_id
, video_id
, 'Downloading annotations') 
  31         title 
= self
._html
_search
_regex
(r
'<title>([^<]+)</title>', annotations
, 'title') 
  32         description 
= self
._html
_search
_regex
(r
'<abstract>([^<]+)</abstract>', annotations
, 'abstract', fatal
=False) 
  33         filesize 
= int_or_none(self
._html
_search
_regex
( 
  34             r
'<filesize>([^<]+)</filesize>', annotations
, 'filesize', fatal
=False)) 
  38                 'url': 'http://www.scivee.tv/assets/audio/%s' % video_id
, 
  43                 'url': 'http://www.scivee.tv/assets/video/%s' % video_id
, 
  53             'description': description
, 
  54             'thumbnail': 'http://www.scivee.tv/assets/videothumb/%s' % video_id
,