aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-03-18 02:54:27 +0600
committerSergey M․ <dstftw@gmail.com>2016-03-18 02:54:27 +0600
commite3d17b3c07c6d8bc7fd45af1e45523e8fde5fb58 (patch)
tree6dad1c0ef29408f2ef856a2ffd36beb28534ad89
parent810c10baa1e0177a6a0ef39496f7e972db02d806 (diff)
[noz] Fix extraction on python 2.6 by means of using compat_xpath
-rw-r--r--youtube_dl/extractor/noz.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dl/extractor/noz.py b/youtube_dl/extractor/noz.py
index 656443c49..c47a33d15 100644
--- a/youtube_dl/extractor/noz.py
+++ b/youtube_dl/extractor/noz.py
@@ -2,7 +2,10 @@
from __future__ import unicode_literals
from .common import InfoExtractor
-from ..compat import compat_urllib_parse_unquote
+from ..compat import (
+ compat_urllib_parse_unquote,
+ compat_xpath,
+)
from ..utils import (
int_or_none,
find_xpath_attr,
@@ -47,7 +50,7 @@ class NozIE(InfoExtractor):
duration = int_or_none(xpath_text(
doc, './/article/movie/file/duration'))
formats = []
- for qnode in doc.findall('.//article/movie/file/qualities/qual'):
+ for qnode in doc.findall(compat_xpath('.//article/movie/file/qualities/qual')):
http_url_ele = find_xpath_attr(
qnode, './html_urls/video_url', 'format', 'video/mp4')
http_url = http_url_ele.text if http_url_ele is not None else None