diff options
| author | pw3t <romain@berthor.fr> | 2014-01-05 17:57:55 +0100 |
|---|---|---|
| committer | pw3t <romain@berthor.fr> | 2014-01-05 17:57:55 +0100 |
| commit | 0d93ad20186937f86ca9101c1c7453e99c282107 (patch) | |
| tree | 1ff55038c8df267d8a3a1d4f33fbd4101546bf5d /searx/engines/yacy.py | |
| parent | 89183ed985157540c42c73c5a303dd574c227c7f (diff) | |
| parent | 5c9f6d51746796ef63cd08d27c31e931272e083f (diff) | |
Merge branch 'master' of https://github.com/asciimoo/searx
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/>" |