diff options
author | Bnyro <bnyro@tutanota.com> | 2024-04-20 15:20:44 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-04-20 17:00:17 +0200 |
commit | 644ae5141711a2b3086d38ab1b61db8d5b68a1c3 (patch) | |
tree | 04c770ef20ab28e6aa6e32bed6f2a8bf4cefe978 | |
parent | 0f70e4d305544d882d180d4d2591af1c9e40e863 (diff) | |
download | searxng-644ae5141711a2b3086d38ab1b61db8d5b68a1c3.tar.gz searxng-644ae5141711a2b3086d38ab1b61db8d5b68a1c3.zip |
[fix] yahoo: result titles are getting mixed together
-rw-r--r-- | searx/engines/yahoo.py | 3 |
1 files changed, 2 insertions, 1 deletions
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) |