Use the new '_download_xml' helper in more extractors
This commit is contained in:
parent
6e47b51eef
commit
e26f871228
28 changed files with 38 additions and 105 deletions
|
@ -1,5 +1,4 @@
|
|||
import re
|
||||
import xml.etree.ElementTree
|
||||
|
||||
from .common import InfoExtractor
|
||||
|
||||
|
@ -33,12 +32,10 @@ class SpiegelIE(InfoExtractor):
|
|||
r'<div class="module-title">(.*?)</div>', 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],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue