[extractor/common] Allow angle brackets in attributes in _og_regexes (#7215)

This commit is contained in:
Sergey M․ 2015-10-18 09:11:02 +06:00
parent 49941c4e4f
commit 448ef1f31c
2 changed files with 5 additions and 1 deletions

View file

@ -645,7 +645,7 @@ class InfoExtractor(object):
# Helper functions for extracting OpenGraph info
@staticmethod
def _og_regexes(prop):
content_re = r'content=(?:"([^>]+?)"|\'([^>]+?)\'|\s*([^\s"\'=<>`]+?))'
content_re = r'content=(?:"([^"]+?)"|\'([^\']+?)\'|\s*([^\s"\'=<>`]+?))'
property_re = (r'(?:name|property)=(?:\'og:%(prop)s\'|"og:%(prop)s"|\s*og:%(prop)s\b)'
% {'prop': re.escape(prop)})
template = r'<meta[^>]+?%s[^>]+?%s'