projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c5a994
)
[utils] remove check for val from find_xpath_attr
author
remitamine
<remitamine@gmail.com>
Wed, 2 Mar 2016 20:40:21 +0000
(21:40 +0100)
committer
remitamine
<remitamine@gmail.com>
Wed, 2 Mar 2016 20:40:21 +0000
(21:40 +0100)
youtube_dl/utils.py
patch
|
blob
|
history
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index 606977c5874ac613f0224815e8c91fc5ef62400a..210c47fce873096c995c2a69be0108bba7549c29 100644
(file)
--- a/
youtube_dl/utils.py
+++ b/
youtube_dl/utils.py
@@
-160,8
+160,6
@@
if sys.version_info >= (2, 7):
def find_xpath_attr(node, xpath, key, val=None):
""" Find the xpath xpath[@key=val] """
assert re.match(r'^[a-zA-Z_-]+$', key)
- if val:
- assert re.match(r'^[a-zA-Z0-9@\s:._-]*$', val)
expr = xpath + ('[@%s]' % key if val is None else "[@%s='%s']" % (key, val))
return node.find(expr)
else: