fix: error with urls without scheme ('//ya.ru/index.html')

This commit is contained in:
Maks Snegov 2014-07-20 13:30:22 +04:00
parent b58188b7b7
commit 45f30ca9de

View File

@ -119,6 +119,8 @@ def complete_url(url, base_url):
up = urlparse(url)
if not up.netloc:
url = base_up.scheme + '://' + base_up.netloc + url
elif not up.scheme:
url = base_up.scheme + ':' + url
return url