diff --git a/sweebot.py b/sweebot.py index c9451da..9a5bc09 100644 --- a/sweebot.py +++ b/sweebot.py @@ -851,12 +851,13 @@ while True: try: for i in command: parse = urlparse(i) + unparsed = i while True: if parse.scheme == "gemini": gsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) gemsocket = ssl.wrap_socket(gsocket) gemsocket.connect((parse.hostname, 1965)) - gemsocket.send(bytes(i + "\r\n", "UTF-8")) + gemsocket.send(bytes(unparsed + "\r\n", "UTF-8")) received = "" while True: gemresponse = gemsocket.recv(2048) @@ -872,8 +873,8 @@ while True: if firstline: if i.split(" ")[0][0] == "3": redirected = True - print("redirect -> " + str([i.split(" ")[1]])) parsed = urlparse(i.split(" ")[1]) + unparsed = i.split(" ")[1] break elif i.split(" ")[0][0] != "2": title = True