Fix issues with fetching pages with %20
.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
This commit is contained in:
parent
1c982ccd51
commit
ea02856bc1
6
buku
6
buku
@ -26,7 +26,7 @@ import webbrowser
|
||||
import html.parser as HTMLParser
|
||||
from http.client import HTTPConnection
|
||||
from http.client import HTTPSConnection
|
||||
from urllib.parse import urljoin, unquote
|
||||
from urllib.parse import urljoin, quote, unquote
|
||||
import signal
|
||||
|
||||
# Import libraries needed for encryption
|
||||
@ -161,9 +161,9 @@ def getPageResp(url, redir=False):
|
||||
|
||||
if debug:
|
||||
print("server: [%s]" % server)
|
||||
print("URL: [%s]" % unquote(url))
|
||||
print("URL: [%s]" % quote(unquote(url)))
|
||||
|
||||
urlconn.request("GET", unquote(url))
|
||||
urlconn.request("GET", quote(unquote(url)))
|
||||
resp = urlconn.getresponse()
|
||||
return (resp, urlconn)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user