浏览代码

xpath engine: bug fix

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

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

28
             url = xpath_results[0].attrib.get('href')
28
             url = xpath_results[0].attrib.get('href')
29
     else:
29
     else:
30
         url = xpath_results.attrib.get('href')
30
         url = xpath_results.attrib.get('href')
31
-    if not url.startswith('http://') or not url.startswith('https://'):
31
+    if not url.startswith('http://') and not url.startswith('https://'):
32
         url = 'http://'+url
32
         url = 'http://'+url
33
     parsed_url = urlparse(url)
33
     parsed_url = urlparse(url)
34
     if not parsed_url.netloc:
34
     if not parsed_url.netloc: