]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/jeuxvideo.py
1 from . common
import InfoExtractor
4 class JeuxVideoIE ( InfoExtractor
):
5 _VALID_URL
= r
'https?://.*?\.jeuxvideo\.com/.*/(.*?)\.htm'
8 'url' : 'http://www.jeuxvideo.com/reportages-videos-jeux/0004/00046170/tearaway-playstation-vita-gc-2013-tearaway-nous-presente-ses-papiers-d-identite-00115182.htm' ,
9 'md5' : '046e491afb32a8aaac1f44dd4ddd54ee' ,
13 'title' : 'Tearaway : GC 2013 : Tearaway nous présente ses papiers d \' identité' ,
14 'description' : 'Lorsque les développeurs de LittleBigPlanet proposent un nouveau titre, on ne peut que s \' attendre à un résultat original et fort attrayant.' ,
17 'url' : 'http://www.jeuxvideo.com/videos/chroniques/434220/l-histoire-du-jeu-video-la-saturn.htm' ,
18 'only_matching' : True ,
21 def _real_extract ( self
, url
):
22 mobj
= self
._ match
_ valid
_u rl
( url
)
24 webpage
= self
._ download
_ webpage
( url
, title
)
25 title
= self
._ html
_ search
_ meta
( 'name' , webpage
) or self
._ og
_ search
_ title
( webpage
)
26 config_url
= self
._ html
_ search
_ regex
(
27 r
'data-src(?:set-video)?="(/contenu/medias/video\.php.*?)"' ,
28 webpage
, 'config URL' )
29 config_url
= 'http://www.jeuxvideo.com' + config_url
31 video_id
= self
._ search
_ regex
(
33 config_url
, 'video ID' )
35 config
= self
._ download
_ json
(
36 config_url
, title
, 'Downloading JSON config' )
39 'url' : source
[ 'file' ],
40 'format_id' : source
[ 'label' ],
41 'resolution' : source
[ 'label' ],
42 } for source
in reversed ( config
[ 'sources' ])]
48 'description' : self
._ og
_ search
_ description
( webpage
),
49 'thumbnail' : config
. get ( 'image' ),