From ff5a4b0e3b2b827e411ac443906a6e12acd8276b Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Thu, 26 Apr 2012 12:52:19 +1200 Subject: [PATCH] A quick tweak --- plugins/google.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/google.py b/plugins/google.py index 270e4d6..afa97e1 100755 --- a/plugins/google.py +++ b/plugins/google.py @@ -45,13 +45,11 @@ def google(inp): title = http.unescape(result['titleNoFormatting']) content = http.unescape(result['content']) - if len(content) == 0: + if not content: content = "No description available." else: content = http.html.fromstring(content).text_content() out = '%s -- \x02%s\x02: "%s"' % (result['unescapedUrl'], title, content) - out = truncate_words(out, 300) - - return out + return truncate_words(out, 300) \ No newline at end of file