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] yahoo: result titles are getting mixed together

Bnyro644ae5141711
diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py
index d5edde212..305cf523d 100644
--- a/searx/engines/yahoo.py
+++ b/searx/engines/yahoo.py
@@ -132,7 +132,8 @@ def response(resp):
continue
url = parse_url(url)
- title = extract_text(result.xpath('.//h3//a/@aria-label'))
+ title = eval_xpath_getindex(result, './/h3//a/@aria-label', 0, default='')
+ title = extract_text(title)
content = eval_xpath_getindex(result, './/div[contains(@class, "compText")]', 0, default='')
content = extract_text(content, allow_none=True)