From e26f8712289c727a43d74a4669aee4924b9f75f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Tue, 26 Nov 2013 18:48:52 +0100 Subject: Use the new '_download_xml' helper in more extractors --- youtube_dl/extractor/toutv.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'youtube_dl/extractor/toutv.py') diff --git a/youtube_dl/extractor/toutv.py b/youtube_dl/extractor/toutv.py index 2f728d3dc..1e9598ef6 100644 --- a/youtube_dl/extractor/toutv.py +++ b/youtube_dl/extractor/toutv.py @@ -1,6 +1,5 @@ # coding: utf-8 import re -import xml.etree.ElementTree from .common import InfoExtractor from ..utils import ( @@ -40,11 +39,9 @@ class TouTvIE(InfoExtractor): r'"idMedia":\s*"([^"]+)"', webpage, u'media ID') streams_url = u'http://release.theplatform.com/content.select?pid=' + mediaId - streams_webpage = self._download_webpage( + streams_doc = self._download_xml( streams_url, video_id, note=u'Downloading stream list') - streams_doc = xml.etree.ElementTree.fromstring( - streams_webpage.encode('utf-8')) video_url = next(n.text for n in streams_doc.findall('.//choice/url') if u'//ad.doubleclick' not in n.text) -- cgit v1.2.3