summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/duckduckgo_definitions.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/engines/duckduckgo_definitions.py b/searx/engines/duckduckgo_definitions.py
index e8146cc3e..59caed8ce 100644
--- a/searx/engines/duckduckgo_definitions.py
+++ b/searx/engines/duckduckgo_definitions.py
@@ -238,7 +238,10 @@ def unit_to_str(unit):
for prefix in WIKIDATA_PREFIX:
if unit.startswith(prefix):
wikidata_entity = unit[len(prefix) :]
- return WIKIDATA_UNITS.get(wikidata_entity, unit)
+ real_unit = WIKIDATA_UNITS.get(wikidata_entity)
+ if real_unit is None:
+ return unit
+ return real_unit['symbol']
return unit