Browse Source

xpath engine: bug fix

dalf 11 years ago
parent
commit
664c039b38
1 changed files with 1 additions and 1 deletions
  1. 1 1
      searx/engines/xpath.py

+ 1 - 1
searx/engines/xpath.py

@@ -28,7 +28,7 @@ def extract_url(xpath_results):
             url = xpath_results[0].attrib.get('href')
     else:
         url = xpath_results.attrib.get('href')
-    if not url.startswith('http://') or not url.startswith('https://'):
+    if not url.startswith('http://') and not url.startswith('https://'):
         url = 'http://'+url
     parsed_url = urlparse(url)
     if not parsed_url.netloc: