From d74bebd50263a2f744595b9a54825914bc07657b Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Sat, 13 Sep 2014 09:11:14 +0200 Subject: [PATCH] [utils] Apply 2.6 xpath craziness This fixes ARD on 2.6 --- youtube_dl/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 7536b3b36..247788078 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -305,6 +305,9 @@ def xpath_with_ns(path, ns_map): def xpath_text(node, xpath, name=None, fatal=False): + if sys.version_info < (2, 7): # Crazy 2.6 + xpath = xpath.encode('ascii') + n = node.find(xpath) if n is None: if fatal: -- 2.22.2