mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[fix] pep8 compatibilty
This commit is contained in:
@@ -43,7 +43,7 @@ def extract_url(xpath_results, search_url):
|
||||
if url.startswith('//'):
|
||||
# add http or https to this kind of url //example.com/
|
||||
parsed_search_url = urlparse(search_url)
|
||||
url = parsed_search_url.scheme+url
|
||||
url = parsed_search_url.scheme + url
|
||||
elif url.startswith('/'):
|
||||
# fix relative url to the search engine
|
||||
url = urljoin(search_url, url)
|
||||
@@ -69,7 +69,7 @@ def normalize_url(url):
|
||||
p = parsed_url.path
|
||||
mark = p.find('/**')
|
||||
if mark != -1:
|
||||
return unquote(p[mark+3:]).decode('utf-8')
|
||||
return unquote(p[mark + 3:]).decode('utf-8')
|
||||
|
||||
return url
|
||||
|
||||
|
||||
Reference in New Issue
Block a user