commit: a4ffeddce1bc56b0faa548e0485ccd6374c4e9d1
parent a92e3ba4464853eeb44ed77661b763e75f619e5e
Author: Dalf <alex@al-f.net>
Date: Sun, 7 Sep 2014 18:42:56 +0200
[fix] yahoo engines: parse_url doesn't throw an exception with not tracking URL
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py
@@ -40,9 +40,11 @@ def parse_url(url_string):
if endpos > -1:
endpositions.append(endpos)
- end = min(endpositions)
-
- return unquote(url_string[start:end])
+ if start==0 or len(endpositions) == 0:
+ return url_string
+ else:
+ end = min(endpositions)
+ return unquote(url_string[start:end])
# do search-request