summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2024-08-28 20:06:20 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-08-30 09:02:37 +0200
commit6a7b1a1a572f097d4936983ef0846eb60f2d64ac (patch)
treeaffbe8ab412068e7cc66da5439d5530756fa75cb
parent526428a69bba16c735b55e401b5399a6ac5d8b9d (diff)
downloadsearxng-6a7b1a1a572f097d4936983ef0846eb60f2d64ac.tar.gz
searxng-6a7b1a1a572f097d4936983ef0846eb60f2d64ac.zip
[fix] Do not show DDG user-agent from zero click
We do not want to show the user-agent information from the duckduckgo zero click info. This is the user-agent used by searxng and not the user-agent used by the user. This was already done for the IP address in: 0fb3f0e4aeecf62612cb6568910cf0f97c98cab9
-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 feaa719d9..27171778d 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 and "Your IP address is" not in zero_click:
+ if zero_click and "Your IP address is" not in zero_click and "Your user agent:" not in zero_click:
current_query = resp.search_params["data"].get("q")
results.append(