mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[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>
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user