fix: error with empty GET urls
This commit is contained in:
parent
594ff71991
commit
6a818f4bb4
@ -56,7 +56,8 @@ def download_content(url, depth=0):
|
|||||||
else:
|
else:
|
||||||
raise NotImplementedError("protocol %s is not implemented" % up.scheme)
|
raise NotImplementedError("protocol %s is not implemented" % up.scheme)
|
||||||
|
|
||||||
conn.request("GET", '?'.join((up.path, up.query)), None, headers)
|
requrl = ('?'.join((up.path, up.query)) if up.query else up.path) or '/'
|
||||||
|
conn.request("GET", requrl, None, headers)
|
||||||
response = conn.getresponse()
|
response = conn.getresponse()
|
||||||
|
|
||||||
# follow redirects
|
# follow redirects
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user