diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-11-10 02:51:52 -0800 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-11-10 02:51:52 -0800 |
commit | fb53d58dcf5e407f39ac79f05d838a20e00823c1 (patch) | |
tree | bc971898cf4dfbaee77911c3e4c17b4b327a4fcd | |
parent | 2a9e9b210b27778a71d920d4c7a0508c0cd446f9 (diff) | |
parent | a8eeb0597b11dbc9d1b48f95264cc2815311aa15 (diff) |
Merge pull request #1726 from saper/escaped
Fix AssertionError when og property not found
-rw-r--r-- | youtube_dl/extractor/common.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index e0ccba533..fb2d50a09 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -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) |