From ca441f419ca2e3a4a6cf90ac853a3ff6d69df967 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 21 Nov 2025 08:16:24 +0100 Subject: [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 --- searx/engines/pubmed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'searx/engines/pubmed.py') diff --git a/searx/engines/pubmed.py b/searx/engines/pubmed.py index 6fcfaa9a3..7e5ef2ce1 100644 --- a/searx/engines/pubmed.py +++ b/searx/engines/pubmed.py @@ -73,7 +73,7 @@ def request(query: str, params: "OnlineParams") -> None: ) esearch_url = f"{eutils_api}/esearch.fcgi?{args}" # DTD: https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20060628/esearch.dtd - esearch_resp: "SXNG_Response" = get(esearch_url) + esearch_resp: "SXNG_Response" = get(esearch_url, timeout=3) pmids_results = etree.XML(esearch_resp.content) pmids: list[str] = [i.text for i in pmids_results.xpath("//eSearchResult/IdList/Id")] -- cgit v1.2.3