From d997265e5599333b4316561ca18a8f4131e3e2d9 Mon Sep 17 00:00:00 2001 From: a01200356 Date: Sun, 3 Jan 2016 19:57:37 -0600 Subject: add tests for unicode strings in wolframalpha --- searx/engines/wolframalpha_noapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'searx/engines/wolframalpha_noapi.py') diff --git a/searx/engines/wolframalpha_noapi.py b/searx/engines/wolframalpha_noapi.py index 0f0315630..71ad3b281 100644 --- a/searx/engines/wolframalpha_noapi.py +++ b/searx/engines/wolframalpha_noapi.py @@ -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 -- cgit v1.2.3