From d13c5aa37b02e4df8d5aa7481d0fece3a341f8c2 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Sun, 5 Jan 2014 00:46:42 +0100 Subject: [mod] unused imports and whitespaces purged --- searx/engines/yacy.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'searx/engines/yacy.py') diff --git a/searx/engines/yacy.py b/searx/engines/yacy.py index e24edde56..c93ac522f 100644 --- a/searx/engines/yacy.py +++ b/searx/engines/yacy.py @@ -1,5 +1,5 @@ from json import loads -from urllib import urlencode, quote +from urllib import urlencode url = 'http://localhost:8090' search_url = '/yacysearch.json?{query}&maximumRecords=10' @@ -10,7 +10,7 @@ def request(query, params): def response(resp): raw_search_results = loads(resp.text) - + if not len(raw_search_results): return [] @@ -22,10 +22,10 @@ def response(resp): tmp_result = {} tmp_result['title'] = result['title'] tmp_result['url'] = result['link'] - tmp_result['content'] = '' - + tmp_result['content'] = '' + if len(result['description']): - tmp_result['content'] += result['description'] +"
" + tmp_result['content'] += result['description'] +"
" if len(result['pubDate']): tmp_result['content'] += result['pubDate'] + "
" -- cgit v1.2.3