mirror of
https://github.com/searxng/searxng.git
synced 2024-11-20 09:51:00 +00:00
[fix] yahoo engine url extraction
This commit is contained in:
parent
2d42208e83
commit
ee1ffbc87f
2 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ def response(resp):
|
||||||
|
|
||||||
for result in dom.xpath(results_xpath):
|
for result in dom.xpath(results_xpath):
|
||||||
url_string = extract_url(result.xpath(url_xpath), search_url)
|
url_string = extract_url(result.xpath(url_xpath), search_url)
|
||||||
start = url_string.find('/RU=')+4
|
start = url_string.find('http', url_string.find('/RU=')+1)
|
||||||
end = url_string.rfind('/RS')
|
end = url_string.rfind('/RS')
|
||||||
url = unquote(url_string[start:end])
|
url = unquote(url_string[start:end])
|
||||||
title = extract_text(result.xpath(title_xpath)[0])
|
title = extract_text(result.xpath(title_xpath)[0])
|
||||||
|
|
|
@ -35,7 +35,7 @@ def response(resp):
|
||||||
|
|
||||||
for result in dom.xpath(results_xpath):
|
for result in dom.xpath(results_xpath):
|
||||||
url_string = extract_url(result.xpath(url_xpath), search_url)
|
url_string = extract_url(result.xpath(url_xpath), search_url)
|
||||||
start = url_string.find('/RU=')+4
|
start = url_string.find('http', url_string.find('/RU=')+1)
|
||||||
end = url_string.rfind('/RS')
|
end = url_string.rfind('/RS')
|
||||||
url = unquote(url_string[start:end])
|
url = unquote(url_string[start:end])
|
||||||
title = extract_text(result.xpath(title_xpath)[0])
|
title = extract_text(result.xpath(title_xpath)[0])
|
||||||
|
|
Loading…
Reference in a new issue