summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Alyanak <jeff@alyanak.ca>2024-05-29 00:46:28 +0100
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-05-29 11:23:26 +0200
commit0fb3f0e4aeecf62612cb6568910cf0f97c98cab9 (patch)
tree011007c7d741d4dcc247a80089a3429cf1bbf43d
parentbb7c5bd44c248cda7054782e7ac9f49ee35daed7 (diff)
[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.
-rw-r--r--searx/engines/duckduckgo.py2
1 files changed, 1 insertions, 1 deletions
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(