logo

searx

My custom branche(s) on searx, a meta-search engine
commit: ee1ffbc87f0b2471e33b14561002c400cd8db861
parent: 2d42208e835105119db3bddce1efdf7b90757985
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Tue,  4 Mar 2014 14:19:59 +0100

[fix] yahoo engine url extraction

Diffstat:

Msearx/engines/yahoo.py2+-
Msearx/engines/yahoo_news.py2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py @@ -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]) diff --git a/searx/engines/yahoo_news.py b/searx/engines/yahoo_news.py @@ -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])