Browse Source

[fix] yahoo: result titles are getting mixed together

Bnyro 1 year ago
parent
commit
644ae51417
1 changed files with 2 additions and 1 deletions
  1. 2 1
      searx/engines/yahoo.py

+ 2 - 1
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)