3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 19:22:40 +01:00

Improve Google "versus" search

This commit is contained in:
Pragmatic Software 2018-04-24 12:42:53 -07:00
parent aa93adac21
commit 3ff3dee6f9

View File

@ -35,8 +35,8 @@ print "$nick: ";
if ($arguments =~ m/(.*)\svs\s(.*)/i) {
my ($a, $b) = ($1, $2);
my $result1 = $engine->search($a);
my $result2 = $engine->search($b);
my $result1 = $engine->search("\"$a\" -\"$b\"");
my $result2 = $engine->search("\"$b\" -\"$a\"");
if (not defined $result1 or not defined $result1->items or not @{$result1->items}) {
print "No results for $a\n";