mirror of
https://github.com/searxng/searxng
synced 2024-11-03 09:40:20 +00:00
xpath engine: bug fix
This commit is contained in:
parent
9eddcdb8e4
commit
664c039b38
@ -28,7 +28,7 @@ def extract_url(xpath_results):
|
|||||||
url = xpath_results[0].attrib.get('href')
|
url = xpath_results[0].attrib.get('href')
|
||||||
else:
|
else:
|
||||||
url = xpath_results.attrib.get('href')
|
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
|
url = 'http://'+url
|
||||||
parsed_url = urlparse(url)
|
parsed_url = urlparse(url)
|
||||||
if not parsed_url.netloc:
|
if not parsed_url.netloc:
|
||||||
|
Loading…
Reference in New Issue
Block a user