From 2c2b196668941e21550bfe2ab5f2bff475b6f4f1 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 24 May 2024 08:41:43 +0200 Subject: [PATCH] [feature] add engine google-2000 / a "disables AI support" google AI Overviews has been rolling out to all US based searchers in the mid/end of May 2024. AI Overviews will launch in more countries soon and be available to more than a billion users by the end of the year. [3] By adding extra argument ``&udm=14`` the AI overviews [2] from google are disabled. Sugested by @cocoonkid in [1]. [1] https://github.com/searxng/searxng/discussions/3503 [2] https://tedium.co/2024/05/17/google-web-search-make-default/ [3] https://searchengineland.com/google-rolls-out-ai-overviews-in-us-with-more-countries-coming-soon-440418 Signed-off-by: Markus Heiser --- searx/engines/google.py | 4 ++++ searx/settings.yml | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/searx/engines/google.py b/searx/engines/google.py index 90d687a4e..03bc0f53e 100644 --- a/searx/engines/google.py +++ b/searx/engines/google.py @@ -56,6 +56,8 @@ time_range_dict = {'day': 'd', 'week': 'w', 'month': 'm', 'year': 'y'} # Filter results. 0: None, 1: Moderate, 2: Strict filter_mapping = {0: 'off', 1: 'medium', 2: 'high'} +extra_args = "" + # specific xpath variables # ------------------------ @@ -292,6 +294,8 @@ def request(query, params): } ) ) + if extra_args: + query_url += extra_args if params['time_range'] in time_range_dict: query_url += '&' + urlencode({'tbs': 'qdr:' + time_range_dict[params['time_range']]}) diff --git a/searx/settings.yml b/searx/settings.yml index 65c4966d4..f8977d887 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -820,6 +820,11 @@ engines: timeout: 4.0 disabled: true + - name: google-2000 + engine: google + shortcut: go2 + extra_args: "&udm=14" + - name: google engine: google shortcut: go