aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-11-12 10:36:23 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-11-12 10:36:23 +0100
commiteb0a83986642cf660820b168bd83c8770e3e5ce6 (patch)
treecc10f0797a024422e7741f2eb187a5de752c5353 /youtube_dl
parent1777d5a952ab8d6728172b0a10afe20f060b432a (diff)
downloadyoutube-dl-eb0a83986642cf660820b168bd83c8770e3e5ce6.zip
youtube-dl-eb0a83986642cf660820b168bd83c8770e3e5ce6.tar.gz
youtube-dl-eb0a83986642cf660820b168bd83c8770e3e5ce6.tar.bz2
[common] Simplify og_search_property
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/common.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index fb2d50a..9c20d30 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -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)