aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-09-04 23:57:27 +0600
committerSergey M․ <dstftw@gmail.com>2015-09-04 23:57:27 +0600
commit5d2354f1779182f260b4ef44ef6e92a3b5944183 (patch)
tree899a8fbdd7e201896de8e3c2e66e587bcef4f6a7
parenta41fb80ce1e2fec48d7a4bc15d169061e76ca672 (diff)
[utils] Relax attribute key assert
-rw-r--r--youtube_dl/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index de5069c7b..86b757103 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -141,7 +141,7 @@ def write_json_file(obj, fn):
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)
+ 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))