mirror of
https://github.com/searxng/searxng.git
synced 2025-08-20 10:46:47 +02:00
[fix] pep8 compatibilty
This commit is contained in:
parent
6a158ca2d2
commit
bd22e9a336
18 changed files with 30 additions and 29 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue