mirror of
https://github.com/searxng/searxng.git
synced 2025-07-13 08:19:17 +02:00
add tests for unicode strings in wolframalpha
This commit is contained in:
parent
e5d51a0e98
commit
d997265e55
3 changed files with 186 additions and 212 deletions
|
@ -73,11 +73,11 @@ def response(resp):
|
|||
results.append({'answer': answer})
|
||||
|
||||
# user input is in first part of title
|
||||
title = dom.xpath(title_xpath)[0].text
|
||||
title = dom.xpath(title_xpath)[0].text.encode('utf-8')
|
||||
result_url = request(title[:-16], {})['url']
|
||||
|
||||
# append result
|
||||
results.append({'url': result_url,
|
||||
'title': title})
|
||||
'title': title.decode('utf-8')})
|
||||
|
||||
return results
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue