Parcourir la source

[fix] urlparsing fix

asciimoo il y a 12 ans
Parent
révision
7965da55a7
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2
    0
      searx/engines/xpath.py

+ 2
- 0
searx/engines/xpath.py Voir le fichier

@@ -32,6 +32,8 @@ def extract_url(xpath_results):
32 32
     parsed_url = urlparse(url)
33 33
     if not parsed_url.netloc:
34 34
         raise Exception('Cannot parse url')
35
+    if not parsed_url.path:
36
+        url += '/'
35 37
     return url
36 38
 
37 39
 def request(query, params):