X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Ftoutv.py;h=1e9598ef6d4d7268309fc53d5929088d71cc9cc8;hb=9d11a41fe4f1f70682640e8522565827047dbf89;hp=73ea67da90fb3215e984a68fc577d8125e6a6cfb;hpb=59040888112e7e5a22ef17bacc27ca88d58a5d92;p=youtube-dl diff --git a/youtube_dl/extractor/toutv.py b/youtube_dl/extractor/toutv.py index 73ea67da9..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 ( @@ -28,7 +27,7 @@ class TouTvIE(InfoExtractor): u'params': { u'skip_download': True, # Requires rtmpdump }, - u'xskip': 'Only available in Canada' + u'skip': 'Only available in Canada' } def _real_extract(self, url): @@ -39,13 +38,10 @@ class TouTvIE(InfoExtractor): mediaId = self._search_regex( r'"idMedia":\s*"([^"]+)"', webpage, u'media ID') - # TODO test from de 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)