diff --git a/nevernote.py b/nevernote.py index 26be95b..ecf5aba 100755 --- a/nevernote.py +++ b/nevernote.py @@ -56,7 +56,8 @@ def download_content(url, depth=0): else: 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() # follow redirects