about summary refs log tree commit diff
path: root/youtube_dl/extractor/livestream.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-11-26 18:48:52 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-11-26 19:17:25 +0100
commite26f8712289c727a43d74a4669aee4924b9f75f2 (patch)
treece2e34f10baacc0eb24d0527154e5374560901cd /youtube_dl/extractor/livestream.py
parent6e47b51eef26dbaa3634b73914e4ee7213ad38f7 (diff)
downloadyoutube-dl-e26f8712289c727a43d74a4669aee4924b9f75f2.tar.gz
youtube-dl-e26f8712289c727a43d74a4669aee4924b9f75f2.tar.xz
youtube-dl-e26f8712289c727a43d74a4669aee4924b9f75f2.zip
Use the new '_download_xml' helper in more extractors
Diffstat (limited to 'youtube_dl/extractor/livestream.py')
-rw-r--r--youtube_dl/extractor/livestream.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/youtube_dl/extractor/livestream.py b/youtube_dl/extractor/livestream.py
index 5f548437c..9bc35b115 100644
--- a/youtube_dl/extractor/livestream.py
+++ b/youtube_dl/extractor/livestream.py
@@ -1,6 +1,5 @@
 import re
 import json
-import xml.etree.ElementTree
 
 from .common import InfoExtractor
 from ..utils import (
@@ -80,8 +79,7 @@ class LivestreamOriginalIE(InfoExtractor):
         user = mobj.group('user')
         api_url = 'http://x{0}x.api.channel.livestream.com/2.0/clipdetails?extendedInfo=true&id={1}'.format(user, video_id)
 
-        api_response = self._download_webpage(api_url, video_id)
-        info = xml.etree.ElementTree.fromstring(api_response.encode('utf-8'))
+        info = self._download_xml(api_url, video_id)
         item = info.find('channel').find('item')
         ns = {'media': 'http://search.yahoo.com/mrss'}
         thumbnail_url = item.find(xpath_with_ns('media:thumbnail', ns)).attrib['url']