From dc6a910fb1d13186f96cf67544d7e3192c9b1e1f Mon Sep 17 00:00:00 2001 From: swee Date: Sun, 12 Jan 2025 20:39:09 -0800 Subject: [PATCH] Update sweebot.py --- sweebot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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