Ver código fonte

[fix] urlparsing fix

asciimoo 12 anos atrás
pai
commit
7965da55a7
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2
    0
      searx/engines/xpath.py

+ 2
- 0
searx/engines/xpath.py Ver arquivo

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