logo

searx

My custom branche(s) on searx, a meta-search engine
commit: faed14b2c691746ba6cf98d164a5e6b1ca3ee4c9
parent: c14e8fe0a50d41871cea8139199b6332dadc7cdb
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Tue, 18 Mar 2014 10:06:14 +0100

[fix] #55

Diffstat:

Msearx/engines/yahoo.py9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py @@ -17,8 +17,15 @@ paging = True def parse_url(url_string): + endings = ['/RS', '/RK'] + endpositions = [] start = url_string.find('http', url_string.find('/RU=')+1) - end = min(url_string.rfind('/RS'), url_string.rfind('/RK')) + for ending in endings: + endpos = url_string.rfind(ending) + if endpos > -1: + endpositions.append(endpos) + + end = min(endpositions) return unquote(url_string[start:end])