Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] brave fetch_traits: layout of the settings page has changed

Markus Heiser0f9926b89a1b
diff --git a/searx/engines/brave.py b/searx/engines/brave.py
index c5780a02c..fea7fb69d 100644
--- a/searx/engines/brave.py
+++ b/searx/engines/brave.py
@@ -426,7 +426,7 @@ def fetch_traits(engine_traits: EngineTraits):
print("ERROR: response from Brave is not OK.")
dom = html.fromstring(resp.text) # type: ignore
- for option in dom.xpath('//div[@id="language-select"]//option'):
+ for option in dom.xpath('//section//option[@value="en-us"]/../option'):
ui_lang = option.get('value')
try: