]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/scivee.py
b1ca12fdee1c012de789ebfaf15f03f04e73f768
   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', 
  21         'skip': 'Not accessible from Travis CI server', 
  24     def _real_extract(self
, url
): 
  25         mobj 
= re
.match(self
._VALID
_URL
, url
) 
  26         video_id 
= mobj
.group('id') 
  28         # annotations XML is malformed 
  29         annotations 
= self
._download
_webpage
( 
  30             'http://www.scivee.tv/assets/annotations/%s' % video_id
, video_id
, 'Downloading annotations') 
  32         title 
= self
._html
_search
_regex
(r
'<title>([^<]+)</title>', annotations
, 'title') 
  33         description 
= self
._html
_search
_regex
(r
'<abstract>([^<]+)</abstract>', annotations
, 'abstract', fatal
=False) 
  34         filesize 
= int_or_none(self
._html
_search
_regex
( 
  35             r
'<filesize>([^<]+)</filesize>', annotations
, 'filesize', fatal
=False)) 
  39                 'url': 'http://www.scivee.tv/assets/audio/%s' % video_id
, 
  44                 'url': 'http://www.scivee.tv/assets/video/%s' % video_id
, 
  54             'description': description
, 
  55             'thumbnail': 'http://www.scivee.tv/assets/videothumb/%s' % video_id
,