diff options
author | asciimoo <asciimoo@gmail.com> | 2014-01-05 00:46:42 +0100 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2014-01-05 00:46:42 +0100 |
commit | d13c5aa37b02e4df8d5aa7481d0fece3a341f8c2 (patch) | |
tree | ba23a1948e1702c3912ccdc9dfe3c494c965841a /searx/engines/yacy.py | |
parent | 27cae541972cabd460142aa3d009ea00c37c29d5 (diff) | |
download | searxng-d13c5aa37b02e4df8d5aa7481d0fece3a341f8c2.tar.gz searxng-d13c5aa37b02e4df8d5aa7481d0fece3a341f8c2.zip |
[mod] unused imports and whitespaces purged
Diffstat (limited to 'searx/engines/yacy.py')
-rw-r--r-- | searx/engines/yacy.py | 10 |
1 files changed, 5 insertions, 5 deletions
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'] +"<br/>" + tmp_result['content'] += result['description'] +"<br/>" if len(result['pubDate']): tmp_result['content'] += result['pubDate'] + "<br/>" |