about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-10-09 14:11:00 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-10-09 14:11:00 +0800
commit57935b2564c082b90a60468d4c844b219118886a (patch)
tree42c892b871b9b21c0580e9566469b0fc47a1d7fa
parent54a5428518adc4ddca085bdac471bc4f286024e4 (diff)
downloadyoutube-dl-57935b2564c082b90a60468d4c844b219118886a.tar.gz
youtube-dl-57935b2564c082b90a60468d4c844b219118886a.tar.xz
youtube-dl-57935b2564c082b90a60468d4c844b219118886a.zip
[extractor/common] Allow HTML5 unquoted attribute values
Fixes #7108

HTML5 allows unquoted attribute values. See the "Unquoted attribute value
syntax" section [1] for more information

[1] http://www.w3.org/TR/html5/syntax.html
-rw-r--r--youtube_dl/extractor/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index dbae75406..242618c58 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -646,7 +646,7 @@ class InfoExtractor(object):
     @staticmethod
     def _og_regexes(prop):
         content_re = r'content=(?:"([^>]+?)"|\'([^>]+?)\')'
-        property_re = r'(?:name|property)=[\'"]og:%s[\'"]' % re.escape(prop)
+        property_re = r'(?:name|property)=[\'"]?og:%s[\'"]?' % re.escape(prop)
         template = r'<meta[^>]+?%s[^>]+?%s'
         return [
             template % (property_re, content_re),