This website works better with JavaScript.
Home
Help
Sign In
zolfa
/
youtube-dl
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
1.1k
Wiki
Activity
Browse Source
[utils] Apply 2.6 xpath craziness
This fixes ARD on 2.6
totalwebcasting
Philipp Hagemeister
10 years ago
parent
bf0ff93277
commit
d74bebd502
1 changed files
with
3 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
youtube_dl/utils.py
+ 3
- 0
youtube_dl/utils.py
View File
@ -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
:
Write
Preview
Loading…
Cancel
Save