]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[utils] remove check for val from find_xpath_attr
authorremitamine <remitamine@gmail.com>
Wed, 2 Mar 2016 20:40:21 +0000 (21:40 +0100)
committerremitamine <remitamine@gmail.com>
Wed, 2 Mar 2016 20:40:21 +0000 (21:40 +0100)
youtube_dl/utils.py

index 606977c5874ac613f0224815e8c91fc5ef62400a..210c47fce873096c995c2a69be0108bba7549c29 100644 (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: