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/public_domain_image_archive.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/public_domain_image_archive.py')
| -rw-r--r-- | searx/engines/public_domain_image_archive.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/public_domain_image_archive.py b/searx/engines/public_domain_image_archive.py index e3f8edb59..81beb418d 100644 --- a/searx/engines/public_domain_image_archive.py +++ b/searx/engines/public_domain_image_archive.py @@ -64,7 +64,7 @@ def _get_algolia_api_url(): return __CACHED_API_URL # fake request to extract api url - resp = get(f"{pdia_base_url}/search/?q=") + resp = get(f"{pdia_base_url}/search/?q=", timeout=3) if resp.status_code != 200: raise LookupError("Failed to fetch config location (and as such the API url) for PDImageArchive") pdia_config_filepart = extr(resp.text, pdia_config_start, pdia_config_end) |