浏览代码

[fix] urlparsing fix

asciimoo 11 年前
父节点
当前提交
7965da55a7
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
    0
      searx/engines/xpath.py

+ 2
- 0
searx/engines/xpath.py 查看文件

@@ -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):