diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2025-11-21 08:16:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-21 08:16:24 +0100 |
| commit | ca441f419ca2e3a4a6cf90ac853a3ff6d69df967 (patch) | |
| tree | 85d4cb7f4f52467d596157e7f66d92531619e6bc /searx/engines/semantic_scholar.py | |
| parent | 04e66a2bb4dd412c4a60212ebc30d8a4cc983d45 (diff) | |
[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>
Diffstat (limited to 'searx/engines/semantic_scholar.py')
| -rw-r--r-- | searx/engines/semantic_scholar.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/semantic_scholar.py b/searx/engines/semantic_scholar.py index 985ebd8a3..390eccff3 100644 --- a/searx/engines/semantic_scholar.py +++ b/searx/engines/semantic_scholar.py @@ -66,7 +66,7 @@ def setup(engine_settings: dict[str, t.Any]) -> bool: def get_ui_version() -> str: ret_val: str = CACHE.get("X-S2-UI-Version") if not ret_val: - resp = get(base_url) + resp = get(base_url, timeout=3) if not resp.ok: raise RuntimeError("Can't determine Semantic Scholar UI version") |