소스 검색

xpath engine: bug fix

dalf 11 년 전
부모
커밋
664c039b38
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      searx/engines/xpath.py

+ 1
- 1
searx/engines/xpath.py 파일 보기

@@ -28,7 +28,7 @@ def extract_url(xpath_results):
28 28
             url = xpath_results[0].attrib.get('href')
29 29
     else:
30 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 32
         url = 'http://'+url
33 33
     parsed_url = urlparse(url)
34 34
     if not parsed_url.netloc: