on master help sign in
[fix] yahoo engines: parse_url doesn't throw an exception with not tracking URL
commita4ffeddce1bc56b0faa548e0485ccd6374c4e9d1 authorDalf <alex@al-f.net> dateSun 7 Sep 2014, 18:42 (12 years ago) parenta92e3ba
1 file changed+5−3
searx/engines/yahoo.py+5−3
searx/engines/yahoo.py+5−3
@@ -40,9 +40,11 @@ def parse_url(url_string):
4040 if endpos > -1:
4141 endpositions.append(endpos)
4242
43− end = min(endpositions)
44−
45− return unquote(url_string[start:end])
43+ if start==0 or len(endpositions) == 0:
44+ return url_string
45+ else:
46+ end = min(endpositions)
47+ return unquote(url_string[start:end])
4648
4749
4850# do search-request