]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/la7.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
9 class LA7IE(InfoExtractor
):
12 https?://(?:www\.)?la7\.tv/
14 richplayer/\?assetid=|
20 'url': 'http://www.la7.tv/richplayer/?assetid=50355319',
21 'md5': 'ec7d1f0224d20ba293ab56cf2259651f',
26 'description': 'Un film di Paolo Sorrentino con Toni Servillo, Anna Bonaiuto, Giulio Bosetti e Flavio Bucci',
29 'skip': 'Blocked in the US',
32 def _real_extract(self
, url
):
33 video_id
= self
._match
_id
(url
)
34 xml_url
= 'http://www.la7.tv/repliche/content/index.php?contentId=%s' % video_id
35 doc
= self
._download
_xml
(xml_url
, video_id
)
37 video_title
= doc
.find('title').text
38 description
= doc
.find('description').text
39 duration
= parse_duration(doc
.find('duration').text
)
40 thumbnail
= doc
.find('img').text
41 view_count
= int(doc
.find('views').text
)
43 prefix
= doc
.find('.//fqdn').text
.strip().replace('auto:', 'http:')
46 'format': vnode
.find('quality').text
,
47 'tbr': int(vnode
.find('quality').text
),
48 'url': vnode
.find('fms').text
.strip().replace('mp4:', prefix
),
49 } for vnode
in doc
.findall('.//videos/video')]
50 self
._sort
_formats
(formats
)
55 'description': description
,
56 'thumbnail': thumbnail
,
59 'view_count': view_count
,