Commit 1c7041ee authored by Svetlana Tkachenko's avatar Svetlana Tkachenko
Browse files

Admit no results case for Google and DDG plugins (for issue #21)

parent 9625d0d5
......@@ -53,5 +53,7 @@ class ddg(object):
elif str(jl["Definition"]) != "":
url = urllib.parse.unquote(str(jl["DefinitionURL"]))
self.server.doMessage(channel, user + ": " + "%s %s" % (url, str(jl["Definition"])))
else:
self.server.doMessage(channel, "No results for " + request + '.')
except Exception as e:
self.server.doMessage(channel, user + ": " + str(e))
......@@ -46,3 +46,5 @@ class Google(object):
title = result1['titleNoFormatting']
title = self.h.unescape(title)
self.server.doMessage(channel, title + ' - ' + result1['unescapedUrl'])
else:
self.server.doMessage(channel, "No results for " + search + '.')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment