Fix for bug #1029837, exception when calling google with unicode characters.

This commit is contained in:
James Vega 2004-09-19 23:22:10 +00:00
parent c873d0eabb
commit b396a9f19e

View File

@ -104,7 +104,8 @@ def search(log, queries, **kwargs):
proxy = conf.supybot.protocols.http.proxy()
if proxy:
kwargs['http_proxy'] = proxy
data = google.doGoogleSearch(' '.join(queries), **kwargs)
query = ' '.join(queries).decode('utf-8')
data = google.doGoogleSearch(query, **kwargs)
searches = conf.supybot.plugins.Google.state.searches() + 1
conf.supybot.plugins.Google.state.searches.setValue(searches)
time = conf.supybot.plugins.Google.state.time() + data.meta.searchTime