From b48205b384d224483573143c3726d2427acec61d Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sat, 13 Jun 2026 09:37:43 +0200 Subject: [PATCH] [fix] tiger: crashes on empty result (#6251) e.g. when searching for "!tiger pottering github", it crashes. not really sure why - the problem is that the HTML doesn't really uses descriptive classes or ids, only Tailwind, so it's very hard to select only the results HTML. --- searx/engines/tiger.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 "", )