summaryrefslogtreecommitdiff
path: root/searx/search/processors/online.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2025-11-25 13:28:47 +0100
committerGitHub <noreply@github.com>2025-11-25 13:28:47 +0100
commitebb9ea45715d655072400b2b5925f03ec96cf5eb (patch)
tree758e04a2f04c93229d51e445b0d2a92fbfec1c9c /searx/search/processors/online.py
parent54a97e10431c1cdae910d3b37074a63eda7100fc (diff)
[fix] brave engines - web, images & videos (#5478)
brave web: xpath selectors needed to be justified brave images & videos: The JS code with the JS object was read incorrectly; not always, but quite often, it led to exceptions when the Python data structure was created from it. BTW: A complete review was conducted and corrections or additions were made to the type definitions. To test all brave engines in once:: !br !brimg !brvid !brnews weather Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/search/processors/online.py')
-rw-r--r--searx/search/processors/online.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/searx/search/processors/online.py b/searx/search/processors/online.py
index 8592457d3..1195b2fad 100644
--- a/searx/search/processors/online.py
+++ b/searx/search/processors/online.py
@@ -155,8 +155,15 @@ class OnlineProcessor(EngineProcessor):
search_query.locale.language,
)
headers["Accept-Language"] = ac_lang
-
self.logger.debug("HTTP Accept-Language: %s", headers.get("Accept-Language", ""))
+
+ # https://developer.mozilla.org/en-US/docs/Glossary/Fetch_metadata_request_header
+ headers["Sec-Fetch-Dest"] = "empty"
+ headers["Sec-Fetch-Mode"] = "cors"
+ headers["Sec-Fetch-Site"] = "same-origin"
+ headers["Sec-Fetch-User"] = "?1"
+ headers["Sec-GPC"] = "1"
+
return params
def _send_http_request(self, params: OnlineParams):