mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-06-30 19:12:49 -05:00
[brightcove] fix on Python 2.6
This commit is contained in:
@ -201,8 +201,8 @@ else:
|
||||
if sys.version_info >= (2,7):
|
||||
def find_xpath_attr(node, xpath, key, val):
|
||||
""" Find the xpath xpath[@key=val] """
|
||||
assert re.match(r'^[a-z]+$', key)
|
||||
assert re.match(r'^[a-z]*$', val)
|
||||
assert re.match(r'^[a-zA-Z]+$', key)
|
||||
assert re.match(r'^[a-zA-Z@]*$', val)
|
||||
expr = xpath + u"[@%s='%s']" % (key, val)
|
||||
return node.find(expr)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user