Fix the passing of quoted text on to Google searches ... again. This time it's

correct.  ;)
This commit is contained in:
James Vega 2004-03-17 13:38:04 +00:00
parent 823c91ff44
commit 3ae730a94c

View File

@ -102,7 +102,7 @@ def search(log, queries, **kwargs):
for (i, query) in enumerate(queries): for (i, query) in enumerate(queries):
if len(query.split(None, 1)) > 1: if len(query.split(None, 1)) > 1:
queries[i] = repr(query) queries[i] = repr(query)
data = google.doGoogleSearch(' '.join(query), **kwargs) data = google.doGoogleSearch(' '.join(queries), **kwargs)
now = time.time() now = time.time()
totalSearches += 1 totalSearches += 1
totalTime += data.meta.searchTime totalTime += data.meta.searchTime
@ -203,9 +203,6 @@ class Google(callbacks.PrivmsgCommandAndRegexp):
kwargs['filter'] = False kwargs['filter'] = False
else: else:
kwargs[option[2:]] = argument kwargs[option[2:]] = argument
for (i, arg) in enumerate(args):
if len(arg.split()) > 1:
args[i] = repr(arg)
try: try:
data = search(self.log, rest, **kwargs) data = search(self.log, rest, **kwargs)
except google.NoLicenseKey, e: except google.NoLicenseKey, e: