Browse Source

Merge pull request #1726 from saper/escaped

Fix AssertionError when og property not found
rtmp_test
Jaime Marquínez Ferrándiz 11 years ago
parent
commit
fb53d58dcf
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      youtube_dl/extractor/common.py

+ 3
- 1
youtube_dl/extractor/common.py View File

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


Loading…
Cancel
Save