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
add correction support for duckduckgo
Gordon Quad385e9b5c9e2d
diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.pyindex 0d2c0af2d..6e07b5021 100644--- a/searx/engines/duckduckgo.py+++ b/searx/engines/duckduckgo.py@@ -50,6 +50,7 @@ result_xpath = '//div[@class="result results_links results_links_deep web-resulturl_xpath = './/a[@class="result__a"]/@href'title_xpath = './/a[@class="result__a"]'content_xpath = './/a[@class="result__snippet"]'+correction_xpath = '//div[@id="did_you_mean"]//a'# match query's language to a region code that duckduckgo will accept@@ -125,6 +126,11 @@ def response(resp):'content': content,'url': res_url})+ # parse correction+ for correction in eval_xpath(doc, correction_xpath):+ # append correction+ results.append({'correction': extract_text(correction)})+# return resultsreturn results