1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-23 00:54:31 +01:00

[common] Simplify og_search_property

This commit is contained in:
Philipp Hagemeister 2013-11-12 10:36:23 +01:00
parent 1777d5a952
commit eb0a839866

View File

@ -322,9 +322,9 @@ class InfoExtractor(object):
if name is None:
name = 'OpenGraph %s' % prop
escaped = self._search_regex(self._og_regex(prop), html, name, flags=re.DOTALL, **kargs)
if not escaped is None:
return unescapeHTML(escaped)
return None
if escaped is None:
return None
return unescapeHTML(escaped)
def _og_search_thumbnail(self, html, **kargs):
return self._og_search_property('image', html, u'thumbnail url', fatal=False, **kargs)