Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] wikidata: fix crash when the item has no description at all and at least one URL.

Alexandre Flamentbef2f2efa8fe
diff --git a/searx/engines/wikidata.py b/searx/engines/wikidata.py
index 539ce5ad4..60d0dc9a0 100644
--- a/searx/engines/wikidata.py
+++ b/searx/engines/wikidata.py
@@ -190,7 +190,7 @@ def get_results(attribute_result, attributes, language):
infobox_id_lang = None
infobox_urls = []
infobox_attributes = []
- infobox_content = attribute_result.get('itemDescription')
+ infobox_content = attribute_result.get('itemDescription', [])
img_src = None
img_src_priority = 100