]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/jeuxvideo.py 
d0720ff561c16e8c0816c5ff7ab333e54c297dbc
   3  from  __future__ 
import  unicode_literals
   7  from  . common 
import  InfoExtractor
  10  class  JeuxVideoIE ( InfoExtractor
):   11      _VALID_URL 
=  r
'http://.*?\.jeuxvideo\.com/.*/(.*?)-\d+\.htm'   14          'url' :  'http://www.jeuxvideo.com/reportages-videos-jeux/0004/00046170/tearaway-playstation-vita-gc-2013-tearaway-nous-presente-ses-papiers-d-identite-00115182.htm' ,   15          'md5' :  '046e491afb32a8aaac1f44dd4ddd54ee' ,   19              'title' :  'Tearaway : GC 2013 : Tearaway nous présente ses papiers d \' identité' ,   20              'description' :  'Lorsque les développeurs de LittleBigPlanet proposent un nouveau titre, on ne peut que s \' attendre à un résultat original et fort attrayant.' ,   24      def  _real_extract ( self
,  url
):   25          mobj 
=  re
. match ( self
._ VALID
_U RL
,  url
)   27          webpage 
=  self
._ download
_ webpage
( url
,  title
)   28          title 
=  self
._ html
_ search
_ meta
( 'name' ,  webpage
)   29          config_url 
=  self
._ html
_ search
_ regex
(   30              r
'data-src="(/contenu/medias/video.php.*?)"' ,   31              webpage
,  'config URL' )   32          config_url 
=  'http://www.jeuxvideo.com'  +  config_url
  34          video_id 
=  self
._ search
_ regex
(   36              config_url
,  'video ID' )   38          config 
=  self
._ download
_ json
(   39              config_url
,  title
,  'Downloading JSON config' )   42              'url' :  source
[ 'file' ],   43              'format_id' :  source
[ 'label' ],   44              'resolution' :  source
[ 'label' ],   45          }  for  source 
in  reversed ( config
[ 'sources' ])]   51              'description' :  self
._ og
_ search
_ description
( webpage
),   52              'thumbnail' :  config
. get ( 'image' ),