Browse Source

[utils] Allow empty attribute values in get_element_by_attribute (Closes #9415)

totalwebcasting
Sergey M․ 8 years ago
parent
commit
abc97b5eda
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      youtube_dl/utils.py

+ 2
- 2
youtube_dl/utils.py View File

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


Loading…
Cancel
Save