[jpopsuki] Simplify

This commit is contained in:
Philipp Hagemeister 2014-01-03 12:51:37 +01:00
parent d2fee313ec
commit 9887c9b2d6
2 changed files with 39 additions and 31 deletions

View file

@ -378,7 +378,7 @@ class InfoExtractor(object):
@staticmethod
def _og_regexes(prop):
content_re = r'content=(?:"([^>]+?)"|\'(.+?)\')'
property_re = r'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),