]>
jfr.im git - yt-dlp.git/blob - youtube_dlc/extractor/la7.py
2 from __future__
import unicode_literals
4 from . common
import InfoExtractor
10 class LA7IE ( InfoExtractor
):
12 _VALID_URL
= r
'''(?x)(https?://)?(?:
13 (?:www\.)?la7\.it/([^/]+)/(?:rivedila7|video)/|
14 tg\.la7\.it/repliche-tgla7\?id=
18 # 'src' is a plain URL
19 'url' : 'http://www.la7.it/crozza/video/inccool8-02-10-2015-163722' ,
20 'md5' : '8b613ffc0c4bf9b9e377169fc19c214c' ,
25 'description' : 'Benvenuti nell \' incredibile mondo della INC. COOL. 8. dove “INC.” sta per “Incorporated” “COOL” sta per “fashion” ed Eight sta per il gesto atletico' ,
26 'thumbnail' : 're:^https?://.*' ,
27 'uploader_id' : 'kdla7pillole@iltrovatore.it' ,
28 'timestamp' : 1443814869 ,
29 'upload_date' : '20151002' ,
32 'url' : 'http://www.la7.it/omnibus/rivedila7/omnibus-news-02-07-2016-189077' ,
33 'only_matching' : True ,
36 def _real_extract ( self
, url
):
37 video_id
= self
._ match
_ id
( url
)
39 if not url
. startswith ( 'http' ):
40 url
= ' %s // %s ' % ( self
. http_scheme (), url
)
42 webpage
= self
._ download
_ webpage
( url
, video_id
)
44 player_data
= self
._ search
_ regex
(
45 [ r
'(?s)videoParams\s*=\s*( {.+?} );' , r
'videoLa7\(( {[^;]+} )\);' ],
46 webpage
, 'player data' )
47 vid
= self
._ search
_ regex
( r
'vid\s*:\s*"(.+?)",' , player_data
, 'vid' )
50 '_type' : 'url_transparent' ,
51 'url' : smuggle_url ( 'kaltura:103: %s ' % vid
, {
52 'service_url' : 'http://nkdam.iltrovatore.it' ,
55 'title' : self
._ og
_ search
_ title
( webpage
, default
= None ),
56 'description' : self
._ og
_ search
_ description
( webpage
, default
= None ),
57 'thumbnail' : self
._ og
_ search
_ thumbnail
( webpage
, default
= None ),