on master help sign in
[fix] yahoo engines: parse_url doesn't throw an exception with not tracking URL
a4ffeddDalf
searx/engines/yahoo.py+5−3
@@ -40,9 +40,11 @@ def parse_url(url_string):
40 if endpos > -1:
40 if endpos > -1:
41 endpositions.append(endpos)
41 endpositions.append(endpos)
42
42
43+ if start==0 or len(endpositions) == 0:
44+ return url_string
45+ else:
43− end = min(endpositions)
46+ end = min(endpositions)
44−
45− return unquote(url_string[start:end])
47+ return unquote(url_string[start:end])
46
48
47
49
48# do search-request
50# do search-request