]>
jfr.im git - yt-dlp.git/blob - youtube_dl/extractor/heise.py
2 from __future__
import unicode_literals
4 from . common
import InfoExtractor
11 class HeiseIE ( InfoExtractor
):
13 https?://(?:www\.)?heise\.de/video/artikel/
14 .+?(?P<id>[0-9]+)\.html(?:$|[?#])
18 'http://www.heise.de/video/artikel/Podcast-c-t-uplink-3-3-Owncloud-Tastaturen-Peilsender-Smartphone-2404147.html'
20 'md5' : 'ffed432483e922e88545ad9f2f15d30e' ,
25 "Podcast: c't uplink 3.3 – Owncloud / Tastaturen / Peilsender Smartphone"
27 'format_id' : 'mp4_720' ,
28 'timestamp' : 1411812600 ,
29 'upload_date' : '20140927' ,
30 'description' : 'In uplink-Episode 3.3 geht es darum, wie man sich von Cloud-Anbietern emanzipieren kann, worauf man beim Kauf einer Tastatur achten sollte und was Smartphones über uns verraten.' ,
34 def _real_extract ( self
, url
):
35 video_id
= self
._ match
_ id
( url
)
37 webpage
= self
._ download
_ webpage
( url
, video_id
)
38 json_url
= self
._ search
_ regex
(
39 r
'json_url:\s*"([^"]+)"' , webpage
, 'json URL' )
40 config
= self
._ download
_ json
( json_url
, video_id
)
44 'thumbnail' : config
. get ( 'poster' ),
45 'timestamp' : parse_iso8601 ( get_meta_content ( 'date' , webpage
)),
46 'description' : self
._ og
_ search
_ description
( webpage
),
49 title
= get_meta_content ( 'fulltitle' , webpage
)
52 elif config
. get ( 'title' ):
53 info
[ 'title' ] = config
[ 'title' ]
55 info
[ 'title' ] = self
._ og
_ search
_ title
( webpage
)
58 for t
, rs
in config
[ 'formats' ]. items ():
59 if not rs
or not hasattr ( rs
, 'items' ):
60 self
._ downloader
. report_warning (
61 'formats: {0} : no resolutions' . format ( t
))
64 for height_str
, obj
in rs
. items ():
65 format_id
= ' {0} _ {1} ' . format ( t
, height_str
)
67 if not obj
or not obj
. get ( 'url' ):
68 self
._ downloader
. report_warning (
69 'formats: {0} : no url' . format ( format_id
))
74 'format_id' : format_id
,
75 'height' : self
._ int
( height_str
, 'height' ),
78 self
._ sort
_ formats
( formats
)
79 info
[ 'formats' ] = formats