1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 12:10:11 +01:00

[fix] yahoo engine url extraction

This commit is contained in:
Adam Tauber 2014-03-04 14:19:59 +01:00
parent 2d42208e83
commit ee1ffbc87f
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ def response(resp):
for result in dom.xpath(results_xpath):
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')
url = unquote(url_string[start:end])
title = extract_text(result.xpath(title_xpath)[0])

View File

@ -35,7 +35,7 @@ def response(resp):
for result in dom.xpath(results_xpath):
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')
url = unquote(url_string[start:end])
title = extract_text(result.xpath(title_xpath)[0])