Skip to content

A feature-rich command-line audio/video downloader

[extractor/common] Allow quoteless content attribute in og regexes (Closes #7115)

Sergey M․4180a3d8b7c4
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 242618c583..0082a4c846 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -645,7 +645,7 @@ class InfoExtractor(object):
# Helper functions for extracting OpenGraph info
@staticmethod
def _og_regexes(prop):
- content_re = r'content=(?:"([^>]+?)"|\'([^>]+?)\')'
+ content_re = r'content=(?:"([^>]+?)"|\'([^>]+?)\'|\s*([^\s"\'=<>`]+?))'
property_re = r'(?:name|property)=[\'"]?og:%s[\'"]?' % re.escape(prop)
template = r'<meta[^>]+?%s[^>]+?%s'
return [