mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[common] Simplify og_search_property
This commit is contained in:
parent
1777d5a952
commit
eb0a839866
1 changed files with 3 additions and 3 deletions
|
@ -322,9 +322,9 @@ def _og_search_property(self, prop, html, name=None, **kargs):
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue