mirror of https://github.com/searxng/searxng.git
[fix] Bug: Yahoo results for simplified Chinese search sometimes have the first character cut off #2866
Co-authored-by: Blair Noctis <n@sail.ng>
This commit is contained in:
parent
fb88721532
commit
d4d9f2073e
|
@ -133,12 +133,7 @@ def response(resp):
|
||||||
continue
|
continue
|
||||||
url = parse_url(url)
|
url = parse_url(url)
|
||||||
|
|
||||||
title = eval_xpath_getindex(result, './/h3/a', 0, default=None)
|
title = extract_text(result.xpath('.//h3//a/@aria-label'))
|
||||||
if title is None:
|
|
||||||
continue
|
|
||||||
offset = len(extract_text(title.xpath('span')))
|
|
||||||
title = extract_text(title)[offset:]
|
|
||||||
|
|
||||||
content = eval_xpath_getindex(result, './/div[contains(@class, "compText")]', 0, default='')
|
content = eval_xpath_getindex(result, './/div[contains(@class, "compText")]', 0, default='')
|
||||||
content = extract_text(content, allow_none=True)
|
content = extract_text(content, allow_none=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue