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

Fix yacy engine
This commit is contained in:
Adam Tauber 2018-01-06 16:38:12 +01:00 committed by GitHub
commit bb47ea2455
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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'],