X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=youtube_dl%2Fextractor%2Fspiegel.py;h=051a34d5b8b048db9112ac2df5f3f04115447a87;hb=4ddba33f78a11e100653771d10038a7d8e90ec9f;hp=19ce585cf1f6dc89569fa56cd6dc30c23dd17e61;hpb=31cb6d8fefaa42aff293b03e37471bb05d5b8391;p=youtube-dl
diff --git a/youtube_dl/extractor/spiegel.py b/youtube_dl/extractor/spiegel.py
index 19ce585cf..051a34d5b 100644
--- a/youtube_dl/extractor/spiegel.py
+++ b/youtube_dl/extractor/spiegel.py
@@ -1,5 +1,4 @@
import re
-import xml.etree.ElementTree
from .common import InfoExtractor
@@ -33,12 +32,10 @@ class SpiegelIE(InfoExtractor):
r'
(.*?)
', webpage, u'title')
xml_url = u'http://video2.spiegel.de/flash/' + video_id + u'.xml'
- xml_code = self._download_webpage(
+ idoc = self._download_xml(
xml_url, video_id,
note=u'Downloading XML', errnote=u'Failed to download XML')
- idoc = xml.etree.ElementTree.fromstring(xml_code)
-
formats = [
{
'format_id': n.tag.rpartition('type')[2],
@@ -54,9 +51,10 @@ class SpiegelIE(InfoExtractor):
# Blacklist type 6, it's extremely LQ and not available on the same server
if n.tag.startswith('type') and n.tag != 'type6'
]
- formats.sort(key=lambda f: f['vbr'])
duration = float(idoc[0].findall('./duration')[0].text)
+ self._sort_formats(formats)
+
info = {
'id': video_id,
'title': video_title,