logo

searx

My custom branche(s) on searx, a meta-search engine
commit: bb47ea245541f379816cad4ffbe1654c93b48540
parent: e3033393709bce1070e2779d8fde6bc9626e5f16
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Sat,  6 Jan 2018 16:38:12 +0100

Merge pull request #1135 from kvch/fix-yacy-link

Fix yacy engine

Diffstat:

Msearx/engines/yacy.py11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/searx/engines/yacy.py b/searx/engines/yacy.py @@ -74,8 +74,17 @@ def response(resp): for result in search_results[0].get('items', []): # parse image results if result.get('image'): + + result_url = '' + if 'url' in result: + result_url = result['url'] + elif 'link' in result: + result_url = result['link'] + else: + continue + # append result - results.append({'url': result['url'], + results.append({'url': result_url, 'title': result['title'], 'content': '', 'img_src': result['image'],