SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[fix] engine - DDG: ignore zero-click answers without URLs (#6865)
jerry15575629462366b05c051
diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.pyindex 0533b3983..91a8150ad 100644--- a/searx/engines/duckduckgo.py+++ b/searx/engines/duckduckgo.py@@ -510,12 +510,13 @@ def response(resp: "SXNG_Response") -> EngineResults:and "Your user agent:" not in zero_clickand "URL Decoded:" not in zero_click):- res.add(- res.types.Answer(- answer=zero_click,- url=eval_xpath_getindex(doc, '//div[@id="zero_click_abstract"]/a/@href', 0),+ if zero_click_url := eval_xpath_getindex(doc, '//div[@id="zero_click_abstract"]/a/@href', 0, None):+ res.add(+ res.types.Answer(+ answer=zero_click,+ url=zero_click_url,+ ))- )return res