]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/srmediathek.py 
   2  from  __future__ 
import  unicode_literals
   6  from  . common 
import  InfoExtractor
   7  from  .. utils 
import  js_to_json
  10  class  SRMediathekIE ( InfoExtractor
):   11      IE_DESC 
=  'Saarländischer Rundfunk'   12      _VALID_URL 
=  r
'https?://sr-mediathek\.sr-online\.de/index\.php\?.*?&id=(?P<id>[0-9]+)'   15          'url' :  'http://sr-mediathek.sr-online.de/index.php?seite=7&id=28455' ,   19              'title' :  'sportarena (26.10.2014)' ,   20              'description' :  'Ringen: KSV Köllerbach gegen Aachen-Walheim; Frauen-Fußball: 1. FC Saarbrücken gegen Sindelfingen; Motorsport: Rallye in Losheim; dazu: Interview mit Timo Bernhard; Turnen: TG Saar; Reitsport: Deutscher Voltigier-Pokal; Badminton: Interview mit Michael Fuchs ' ,   21              'thumbnail' :  're:^https?://.*\.jpg$' ,   25      def  _real_extract ( self
,  url
):   26          video_id 
=  self
._ match
_ id
( url
)   27          webpage 
=  self
._ download
_ webpage
( url
,  video_id
)   29          murls 
=  json
. loads ( js_to_json ( self
._ search
_ regex
(   30              r
'var mediaURLs\s*=\s*(.*?);\n' ,  webpage
,  'video URLs' )))   31          formats 
= [{ 'url' :  murl
}  for  murl 
in  murls
]   32          self
._ sort
_ formats
( formats
)   34          title 
=  json
. loads ( js_to_json ( self
._ search
_ regex
(   35              r
'var mediaTitles\s*=\s*(.*?);\n' ,  webpage
,  'title' )))[ 0 ]   41              'description' :  self
._ og
_ search
_ description
( webpage
),   42              'thumbnail' :  self
._ og
_ search
_ thumbnail
( webpage
),