aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-05-06 22:07:30 +0600
committerSergey M․ <dstftw@gmail.com>2016-05-06 22:07:30 +0600
commitabc97b5eda4ed4b36cec29e9966eb1bb7bcd97ce (patch)
tree1cfa39257c8c390267095441d385fabc78264129 /youtube_dl/utils.py
parent04e88ca2cac8f97e78cdee2825946e94b6173023 (diff)
[utils] Allow empty attribute values in get_element_by_attribute (Closes #9415)
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index a5922b2b5..6e4573784 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -256,9 +256,9 @@ def get_element_by_attribute(attribute, value, html):
m = re.search(r'''(?xs)
<([a-zA-Z0-9:._-]+)
- (?:\s+[a-zA-Z0-9:._-]+(?:=[a-zA-Z0-9:._-]+|="[^"]+"|='[^']+'))*?
+ (?:\s+[a-zA-Z0-9:._-]+(?:=[a-zA-Z0-9:._-]*|="[^"]*"|='[^']*'))*?
\s+%s=['"]?%s['"]?
- (?:\s+[a-zA-Z0-9:._-]+(?:=[a-zA-Z0-9:._-]+|="[^"]+"|='[^']+'))*?
+ (?:\s+[a-zA-Z0-9:._-]+(?:=[a-zA-Z0-9:._-]*|="[^"]*"|='[^']*'))*?
\s*>
(?P<content>.*?)
</\1>