mirror of
https://github.com/searxng/searxng.git
synced 2025-12-23 04:00:02 +00:00
[chore] engines: remove redundant usages of utils#gen_useragent (#4993)
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:
@@ -4,7 +4,7 @@
|
||||
from urllib.parse import quote_plus
|
||||
from lxml import html
|
||||
|
||||
from searx.utils import eval_xpath, eval_xpath_list, extract_text, gen_useragent
|
||||
from searx.utils import eval_xpath, eval_xpath_list, extract_text
|
||||
|
||||
about = {
|
||||
"website": 'https://uxwing.com',
|
||||
@@ -22,7 +22,6 @@ enable_http2 = False
|
||||
|
||||
def request(query, params):
|
||||
params['url'] = f"{base_url}/?s={quote_plus(query)}"
|
||||
params['headers'] = {'User-Agent': gen_useragent()}
|
||||
return params
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user