summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x9kwpyqt.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/9kwpyqt.py b/9kwpyqt.py
index a0d2534..b3b7359 100755
--- a/9kwpyqt.py
+++ b/9kwpyqt.py
@@ -240,6 +240,8 @@ class CaptchaGUI(QWidget):
QTimer.singleShot(500, self.getCaptchaID)
self.startstopButton.setStyleSheet("QPushButton { background-color: green; }")
return
+ if self.waitingoncaptcha == 0:
+ self.captchaImage.setText("Asking server for new captcha...")
self.startstopButton.setStyleSheet("QPushButton { background-color: red; }")
url = QUrl(self.apiurl+"action=usercaptchanew&text=yes&mouse=0&confirm=0")
self.networkCaptchaID = QNetworkRequest(url)
@@ -256,13 +258,13 @@ class CaptchaGUI(QWidget):
QTimer.singleShot(1000, self.getCaptchaID)
elif content.isnumeric():
self.waitingoncaptcha = 0
- print("New Captcha:", int(content))
+ self.captchaImage.setText("Downloading new captcha.")
self.currentCaptchaID = int(content)
self.getCaptchaIMG()
else:
self.waitingoncaptcha += 1
- print("Unknown error? ID not 'NO CAPTCHA' nor number")
- print(content)
+ status = "Unknown Server response (getCaptchaID).\n"+str(content)
+ self.captchaImage.setText(status)
def getCaptchaIMG(self):
url = QUrl(self.apiurl+"action=usercaptchashow&id="+str(self.currentCaptchaID))