Adam Tauber 11 years ago
parent
commit
faed14b2c6
1 changed files with 8 additions and 1 deletions
  1. 8 1
      searx/engines/yahoo.py

+ 8 - 1
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])