summaryrefslogtreecommitdiff
path: root/searx/engines/yacy.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/yacy.py')
-rw-r--r--searx/engines/yacy.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/searx/engines/yacy.py b/searx/engines/yacy.py
index c93ac522f..a4a41ac3b 100644
--- a/searx/engines/yacy.py
+++ b/searx/engines/yacy.py
@@ -4,10 +4,12 @@ from urllib import urlencode
url = 'http://localhost:8090'
search_url = '/yacysearch.json?{query}&maximumRecords=10'
+
def request(query, params):
- params['url'] = url + search_url.format(query=urlencode({'query':query}))
+ params['url'] = url + search_url.format(query=urlencode({'query': query}))
return params
+
def response(resp):
raw_search_results = loads(resp.text)
@@ -25,7 +27,7 @@ def response(resp):
tmp_result['content'] = ''
if len(result['description']):
- tmp_result['content'] += result['description'] +"<br/>"
+ tmp_result['content'] += result['description'] + "<br/>"
if len(result['pubDate']):
tmp_result['content'] += result['pubDate'] + "<br/>"