1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-22 18:22:21 +00:00

Merge pull request #1726 from saper/escaped

Fix AssertionError when og property not found
This commit is contained in:
Jaime Marquínez Ferrándiz 2013-11-10 02:51:52 -08:00
commit fb53d58dcf

View file

@ -322,7 +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)
return unescapeHTML(escaped)
if not escaped is None:
return unescapeHTML(escaped)
return None
def _og_search_thumbnail(self, html, **kargs):
return self._og_search_property('image', html, u'thumbnail url', fatal=False, **kargs)