on master help sign in
[fix] don't merge with suggestions
commitb808a2e26670e06d6f912f7d169a9c59ee7ac8ee authorpotato <mail@crazypotato.tk> dateTue 6 Sep 2016, 12:37 (10 years ago) parent3f4cc21
1 file changed+3−2
searx/engines/dictionary.py+3−2
searx/engines/dictionary.py+3−2
@@ -1,4 +1,5 @@
11import re
2+from urlparse import urljoin
23from lxml import html
34from searx.engines.xpath import extract_text
45from searx.languages import language_codes
@@ -44,7 +45,7 @@ def response(resp):
4445
4546 dom = html.fromstring(resp.text)
4647
47− for result in dom.xpath(results_xpath)[1:]:
48+ for k, result in enumerate(dom.xpath(results_xpath)[1:]):
4849 try:
4950 from_result, to_results_raw = result.xpath('./td')
5051 except:
@@ -57,7 +58,7 @@ def response(resp):
5758 to_results.append(to_result.text_content())
5859
5960 results.append({
60− 'url': resp.url,
61+ 'url': urljoin(resp.url, '?%d' % k),
6162 'title': from_result.text_content(),
6263 'content': '; '.join(to_results)
6364 })