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] remove usage of no longer existing names from lxml
Markus Heiserbd6ff29f8f19
diff --git a/searx/utils.py b/searx/utils.pyindex cd0e20260..f50618ea2 100644--- a/searx/utils.py+++ b/searx/utils.py@@ -18,7 +18,7 @@ from urllib.parse import urljoin, urlparsefrom markdown_it import MarkdownItfrom lxml import html-from lxml.etree import ElementBase, XPath, XPathError, XPathSyntaxError, _ElementStringResult, _ElementUnicodeResult+from lxml.etree import ElementBase, XPath, XPathError, XPathSyntaxErrorfrom searx import settingsfrom searx.data import USER_AGENTS, data_dir@@ -217,7 +217,7 @@ def extract_text(xpath_results, allow_none: bool = False) -> Optional[str]:text: str = html.tostring(xpath_results, encoding='unicode', method='text', with_tail=False)text = text.strip().replace('\n', ' ')return ' '.join(text.split())- if isinstance(xpath_results, (_ElementStringResult, _ElementUnicodeResult, str, Number, bool)):+ if isinstance(xpath_results, (str, Number, bool)):return str(xpath_results)if xpath_results is None and allow_none:return None