[chore] engines: remove redundant usages of utils#gen_useragent

These engines override the user agent manually using `gen_useragent`, although that's already done in the online preprocessor that runs before the actual `request(query, params)` method is called. Hence, this call is duplicated.

Related:
- https://github.com/searxng/searxng/pull/4990#discussion_r2195142838
This commit is contained in:
Bnyro 2025-07-10 15:16:21 +02:00
parent 2fe8540903
commit d24e489850
No known key found for this signature in database
3 changed files with 10 additions and 13 deletions

View file

@ -6,7 +6,7 @@ from datetime import datetime
import re
import json
from searx.utils import html_to_text, gen_useragent
from searx.utils import html_to_text
from searx.exceptions import SearxEngineAPIException, SearxEngineCaptchaException
# Metadata
@ -77,9 +77,6 @@ def request(query, params):
query_params["tl_request"] = time_range_dict.get(params['time_range'])
params["url"] = f"{query_url}?{urlencode(query_params)}"
params["headers"] = {
"User-Agent": gen_useragent(),
}
return params