[allocine] Use xpath_element
authorYen Chi Hsuan <yan12125@gmail.com>
Sun, 31 Jan 2016 21:32:28 +0000 (05:32 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sun, 31 Jan 2016 21:32:28 +0000 (05:32 +0800)
youtube_dl/extractor/allocine.py

index f6cd3a85fda31fe3138bfad8208fda4cdf986aae..190bc2cc8730853a23b9025f1849bf234a32e001 100644 (file)
@@ -9,6 +9,7 @@ from ..compat import compat_str
 from ..utils import (
     qualities,
     unescapeHTML,
+    xpath_element,
 )
 
 
@@ -71,7 +72,7 @@ class AllocineIE(InfoExtractor):
 
         xml = self._download_xml('http://www.allocine.fr/ws/AcVisiondataV4.ashx?media=%s' % video_id, display_id)
 
-        video = xml.find('./AcVisionVideo').attrib
+        video = xpath_element(xml, './/AcVisionVideo').attrib
         quality = qualities(['ld', 'md', 'hd'])
 
         formats = []