mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-29 18:31:46 +00:00
[utils] Apply 2.6 xpath craziness
This fixes ARD on 2.6
This commit is contained in:
parent
bf0ff93277
commit
d74bebd502
1 changed files with 3 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue