Browse Source

[utils] remove check for val from find_xpath_attr

totalwebcasting
remitamine 8 years ago
parent
commit
e07237f640
1 changed files with 0 additions and 2 deletions
  1. +0
    -2
      youtube_dl/utils.py

+ 0
- 2
youtube_dl/utils.py View File

@ -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:


Loading…
Cancel
Save