1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 20:17:45 +01:00

Merge pull request #2272 from Solirs/Wikidata_desc

wikidata: Add description for results
This commit is contained in:
Markus Heiser 2023-03-22 06:03:48 +01:00 committed by GitHub
commit 41823da1b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,7 +260,7 @@ def get_results(attribute_result, attributes, language):
infobox_urls.append({'title': attribute.get_label(language), 'url': url, **attribute.kwargs}) infobox_urls.append({'title': attribute.get_label(language), 'url': url, **attribute.kwargs})
# "normal" results (not infobox) include official website and Wikipedia links. # "normal" results (not infobox) include official website and Wikipedia links.
if attribute.kwargs.get('official') or attribute_type == WDArticle: if attribute.kwargs.get('official') or attribute_type == WDArticle:
results.append({'title': infobox_title, 'url': url}) results.append({'title': infobox_title, 'url': url, "content": infobox_content})
# update the infobox_id with the wikipedia URL # update the infobox_id with the wikipedia URL
# first the local wikipedia URL, and as fallback the english wikipedia URL # first the local wikipedia URL, and as fallback the english wikipedia URL
if attribute_type == WDArticle and ( if attribute_type == WDArticle and (