[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:
0fb3f0e4ae
This commit is contained in:
Alexander Sulfrian 2024-08-28 20:06:20 +02:00 committed by Markus Heiser
parent 526428a69b
commit 6a7b1a1a57
1 changed files with 1 additions and 1 deletions

View File

@ -331,7 +331,7 @@ def response(resp):
zero_click_info_xpath = '//html/body/form/div/table[2]/tr[2]/td/text()' 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() 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") current_query = resp.search_params["data"].get("q")
results.append( results.append(