From c4b874e9b0cf2b54b0152d95aa5f5b00543383c6 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sat, 23 Nov 2024 10:32:15 +0100 Subject: [PATCH] [fix] engine Library of Congress: fix API URL loc.gov -> www.loc.gov Avoid HTTP 404 and redirects. Requests to the JSON/YAML API use the base url [1] https://www.loc.gov/{endpoint}/?fo=json [1] https://www.loc.gov/apis/json-and-yaml/requests/ Signed-off-by: Markus Heiser --- searx/engines/loc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/engines/loc.py b/searx/engines/loc.py index 5f58eb3dc..927800061 100644 --- a/searx/engines/loc.py +++ b/searx/engines/loc.py @@ -27,7 +27,7 @@ categories = ['images'] paging = True endpoint = 'photos' -base_url = 'https://loc.gov' +base_url = 'https://www.loc.gov' search_string = "/{endpoint}/?sp={page}&{query}&fo=json"