From b808a2e26670e06d6f912f7d169a9c59ee7ac8ee Mon Sep 17 00:00:00 2001 From: potato Date: Tue, 6 Sep 2016 12:37:26 +0200 Subject: [PATCH] [fix] don't merge with suggestions --- searx/engines/dictionary.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/searx/engines/dictionary.py b/searx/engines/dictionary.py index e3abaa1a..080f7b4a 100644 --- a/searx/engines/dictionary.py +++ b/searx/engines/dictionary.py @@ -1,4 +1,5 @@ import re +from urlparse import urljoin from lxml import html from searx.engines.xpath import extract_text from searx.languages import language_codes @@ -44,7 +45,7 @@ def response(resp): dom = html.fromstring(resp.text) - for result in dom.xpath(results_xpath)[1:]: + for k, result in enumerate(dom.xpath(results_xpath)[1:]): try: from_result, to_results_raw = result.xpath('./td') except: @@ -57,7 +58,7 @@ def response(resp): to_results.append(to_result.text_content()) results.append({ - 'url': resp.url, + 'url': urljoin(resp.url, '?%d' % k), 'title': from_result.text_content(), 'content': '; '.join(to_results) })