mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[fix] engines - set hard timouts in *sub-request* (#5460)
The requests changed here all run outside of the network context timeout, thereby preventing the engine's timeout from being applied (the engine's timeout can become longer than it was configured). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
@@ -140,7 +140,7 @@ def _get_request_id(query, params):
|
||||
if l.territory:
|
||||
headers['Accept-Language'] = f"{l.language}-{l.territory},{l.language};" "q=0.9,*;" "q=0.5"
|
||||
|
||||
resp = get(url, headers=headers)
|
||||
resp = get(url, headers=headers, timout=5)
|
||||
|
||||
for line in resp.text.split("\n"):
|
||||
if "window.searchId = " in line:
|
||||
|
||||
Reference in New Issue
Block a user