Skip to content

Commit 10f54ea

Browse files
authored
define "scheme"
1 parent cbb2e44 commit 10f54ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ def js_extractor(response):
108108

109109

110110
def handle_anchor(parent_url, url):
111+
scheme = urlparse(parent_url).scheme
111112
if url[:4] == 'http':
112113
return url
113114
elif url[:2] == '//':
114115
return scheme + ':' + url
115116
elif url.startswith('/'):
116117
host = urlparse(parent_url).netloc
117-
scheme = urlparse(parent_url).scheme
118118
parent_url = scheme + '://' + host
119119
return parent_url + url
120120
elif parent_url.endswith('/'):

0 commit comments

Comments
 (0)