diff options
author | Jinyuan Huang <88757735+BernieHuang2008@users.noreply.github.com> | 2023-09-30 22:38:07 +0000 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2023-10-01 08:29:06 +0200 |
commit | d4d9f2073e880a6e08a1b8521d37b8d56bdacc9b (patch) | |
tree | 5bc1fe263ccc73aba365ceca8fe74221a1951901 /searx/engines/yahoo.py | |
parent | fb8872153250a945ff43e00c8352bfac7cace156 (diff) | |
download | searxng-d4d9f2073e880a6e08a1b8521d37b8d56bdacc9b.tar.gz searxng-d4d9f2073e880a6e08a1b8521d37b8d56bdacc9b.zip |
[fix] Bug: Yahoo results for simplified Chinese search sometimes have the first character cut off #2866
Co-authored-by: Blair Noctis <n@sail.ng>
Diffstat (limited to 'searx/engines/yahoo.py')
-rw-r--r-- | searx/engines/yahoo.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py index 0fdeacec2..442991dc3 100644 --- a/searx/engines/yahoo.py +++ b/searx/engines/yahoo.py @@ -133,12 +133,7 @@ def response(resp): continue url = parse_url(url) - title = eval_xpath_getindex(result, './/h3/a', 0, default=None) - if title is None: - continue - offset = len(extract_text(title.xpath('span'))) - title = extract_text(title)[offset:] - + title = extract_text(result.xpath('.//h3//a/@aria-label')) content = eval_xpath_getindex(result, './/div[contains(@class, "compText")]', 0, default='') content = extract_text(content, allow_none=True) |