mirror of
https://github.com/searxng/searxng.git
synced 2024-12-23 01:36:29 +00:00
[fix] fix of PR #2225
This commit is contained in:
parent
9b27935f71
commit
5c6a5407a0
2 changed files with 15 additions and 10 deletions
|
@ -166,6 +166,9 @@ class Search:
|
|||
if request_params is None:
|
||||
continue
|
||||
|
||||
with threading.RLock():
|
||||
processor.engine.stats['sent_search_count'] += 1
|
||||
|
||||
# append request to list
|
||||
requests.append((engineref.name, self.search_query.query, request_params))
|
||||
|
||||
|
|
|
@ -19,7 +19,9 @@ from searx.search.processors.abstract import EngineProcessor
|
|||
|
||||
logger = logger.getChild('search.processor.online')
|
||||
|
||||
DEFAULT_PARAMS = {
|
||||
|
||||
def default_request_params():
|
||||
return {
|
||||
'method': 'GET',
|
||||
'headers': {},
|
||||
'data': {},
|
||||
|
@ -45,7 +47,7 @@ class OnlineProcessor(EngineProcessor):
|
|||
return None
|
||||
|
||||
# add default params
|
||||
params.update(DEFAULT_PARAMS)
|
||||
params.update(default_request_params())
|
||||
|
||||
# add an user agent
|
||||
params['headers']['User-Agent'] = gen_useragent()
|
||||
|
|
Loading…
Reference in a new issue