[arte] Fix videos.arte.tv extraction

pull/8/head
Jaime Marquínez Ferrándiz 11 years ago
parent fb8ae2d438
commit b2799ff96d

@ -25,6 +25,10 @@ class ArteTvIE(InfoExtractor):
IE_NAME = 'arte.tv' IE_NAME = 'arte.tv'
def _real_extract(self, url): def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id')
lang = mobj.group('lang')
ref_xml_url = url.replace('/videos/', '/do_delegate/videos/') ref_xml_url = url.replace('/videos/', '/do_delegate/videos/')
ref_xml_url = ref_xml_url.replace('.html', ',view,asPlayerXml.xml') ref_xml_url = ref_xml_url.replace('.html', ',view,asPlayerXml.xml')
ref_xml_doc = self._download_xml( ref_xml_doc = self._download_xml(
@ -37,8 +41,9 @@ class ArteTvIE(InfoExtractor):
formats = [{ formats = [{
'forma_id': q.attrib['quality'], 'forma_id': q.attrib['quality'],
'url': q.text, 'url': q.text,
'ext': 'flv',
'quality': 2 if q.attrib['quality'] == 'hd' else 1, 'quality': 2 if q.attrib['quality'] == 'hd' else 1,
} for q in config.findall('.//quality')] } for q in config.findall('./urls/url')]
self._sort_formats(formats) self._sort_formats(formats)
title = config.find('.//name').text title = config.find('.//name').text
@ -47,8 +52,7 @@ class ArteTvIE(InfoExtractor):
'id': video_id, 'id': video_id,
'title': title, 'title': title,
'thumbnail': thumbnail, 'thumbnail': thumbnail,
'url': video_url, 'formats': formats,
'ext': 'flv',
} }

Loading…
Cancel
Save