mirror of
https://github.com/searxng/searxng.git
synced 2025-07-12 15:59:21 +02:00
parent
cac8e7c6b8
commit
f34b5cedb1
2 changed files with 6 additions and 9 deletions
|
@ -111,13 +111,10 @@ def response(resp):
|
|||
tmp_result = {'url': url, 'title': title, 'content': content}
|
||||
|
||||
# add thumbnail if available
|
||||
thumbnail = None
|
||||
if thumbnail_xpath:
|
||||
thumbnail = extract_url(
|
||||
result.xpath(thumbnail_xpath), search_url
|
||||
)
|
||||
if thumbnail:
|
||||
tmp_result['img_src'] = thumbnail
|
||||
thumbnail_xpath_result = result.xpath(thumbnail_xpath)
|
||||
if len(thumbnail_xpath_result) > 0:
|
||||
tmp_result['img_src'] = extract_url(thumbnail_xpath_result, search_url)
|
||||
|
||||
results.append(tmp_result)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue