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] gmx: crash when there are no related query suggestions

Bnyro74f1ca203f62
diff --git a/searx/engines/gmx.py b/searx/engines/gmx.py
index b362cd3c1..dcd829051 100644
--- a/searx/engines/gmx.py
+++ b/searx/engines/gmx.py
@@ -80,7 +80,7 @@ def response(resp: 'SXNG_Response') -> EngineResults:
results = resp.json()["results"]
- for suggestion in results["rs"]:
+ for suggestion in results.get("rs", []):
res.add(res.types.LegacyResult({"suggestion": suggestion["t"]}))
for result in results["hits"]: