From d588913b7d5ec283aac90b4a63b4b29ab31cf56d Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 5 May 2020 13:52:59 -0700 Subject: [PATCH] Plugins/GoogleSearch: handle no results case --- Plugins/GoogleSearch.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Plugins/GoogleSearch.pm b/Plugins/GoogleSearch.pm index 2928cd3f..c6d2f336 100644 --- a/Plugins/GoogleSearch.pm +++ b/Plugins/GoogleSearch.pm @@ -79,7 +79,8 @@ sub cmd_googlesearch { if ($@) { my $error = $@; $error =~ s/^WWW::Google::CustomSearch::search\(\): /google: /; - $error =~ s/file .*$//; + $error =~ s/file .*?$//; + $error =~ s/Missing required arguments: totalResults.*/No results./; return $error; }