Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] yahoo engines: parse_url doesn't throw an exception with not tracking URL

Dalfa4ffeddce1bc
diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py
index 3d048186d..5e34a2b07 100644
--- 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