[mdr] Change XPath to make it work in python 2.6 (fixes #6443)
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Mon, 3 Aug 2015 10:00:08 +0000 (12:00 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Mon, 3 Aug 2015 10:00:08 +0000 (12:00 +0200)
The 'progressiveDownloadUrl' element is a direct child, so they should be equivalent.

youtube_dl/extractor/mdr.py

index 5fdd19027db3ccad0265601b8d88452a0eaac525..fc7499958d750338116f5e14546e15c52377c0b9 100644 (file)
@@ -29,7 +29,7 @@ class MDRIE(InfoExtractor):
         doc = self._download_xml(domain + xmlurl, video_id)
         formats = []
         for a in doc.findall('./assets/asset'):
-            url_el = a.find('.//progressiveDownloadUrl')
+            url_el = a.find('./progressiveDownloadUrl')
             if url_el is None:
                 continue
             abr = int(a.find('bitrateAudio').text) // 1000