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] tiger: crashes on empty result (#6251)

Bnyrob48205b384d2
diff --git a/searx/engines/tiger.py b/searx/engines/tiger.py
index a289ec05d..3f8e1b9c6 100644
--- a/searx/engines/tiger.py
+++ b/searx/engines/tiger.py
@@ -134,9 +134,12 @@ def response(resp: "SXNG_Response") -> EngineResults:
if tiger_category == "Websuche":
for result in eval_xpath_list(doc, "//div[@id='mainContainer']//table/tr"):
+ url = extract_text(eval_xpath(result, ".//a[contains(@class, 'weblink')]/@href"))
+ if not url:
+ continue
res.add(
res.types.MainResult(
- url=extract_text(eval_xpath(result, ".//a[contains(@class, 'weblink')]/@href")),
+ url=url,
title=extract_text(eval_xpath(result, ".//a[contains(@class, 'weblink')]")) or "",
content=extract_text(eval_xpath(result, ".//*[contains(@class, 'webbodynopic')]")) or "",
)