[common] Simplify og_search_property
authorPhilipp Hagemeister <phihag@phihag.de>
Tue, 12 Nov 2013 09:36:23 +0000 (10:36 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Tue, 12 Nov 2013 09:36:23 +0000 (10:36 +0100)
youtube_dl/extractor/common.py

index fb2d50a098992f8088c41259b73d653c6f6f173d..9c20d30b4fe844812e0dc7441e796cc604e7c96f 100644 (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)