This commit is contained in:
j 2010-12-31 13:02:22 +05:30
parent 3d93932200
commit e5dd8a3343

View file

@ -9,9 +9,9 @@ from ox.cache import readUrlUnicode
def find(query, timeout=ox.cache.cache_timeout):
params = urllib.urlencode({'q': query})
if isinstance(query, unicode):
query = query.encode('utf-8')
params = urllib.urlencode({'q': query})
url = 'http://duckduckgo.com/html/?' + params
data = readUrlUnicode(url, timeout=timeout)
results = []