From aec849d7a19d0773cd91c8d817382ace3f7f3375 Mon Sep 17 00:00:00 2001 From: Jeff Alyanak Date: Wed, 29 May 2024 00:46:28 +0100 Subject: [PATCH] [fix] do not show DDG IP from zero click The zero click result from DuckDuckGo for IP should not be displayed. It will return the IP of the searxng server, not the user's IP, and looks a bit strange when the `self_info` plugin is enabled as two different IPs get returned. --- searx/engines/duckduckgo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.py index 3ebddd342..b874ca2f8 100644 --- a/searx/engines/duckduckgo.py +++ b/searx/engines/duckduckgo.py @@ -331,7 +331,7 @@ def response(resp): zero_click_info_xpath = '//html/body/form/div/table[2]/tr[2]/td/text()' zero_click = extract_text(eval_xpath(doc, zero_click_info_xpath)).strip() - if zero_click: + if zero_click and "Your IP address is" not in zero_click: current_query = resp.search_params["data"].get("q") results.append(