diff options
Diffstat (limited to '9kwpyqt.py')
-rwxr-xr-x | 9kwpyqt.py | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -300,19 +300,14 @@ class CaptchaGUI(QWidget): def setCaptchaAnswerCommit(self): message = str(self.networkCaptchaAnswerReply.readAll(), encoding='utf-8') self.networkCaptchaAnswerReply.deleteLater() - if not message: - # TODO: Server error? Retry! (Status 200 + no 'OK'?) - self.networkCaptchaAnswerReply = self.NetworkManager.get(self.networkCaptchaAnswer) - self.networkCaptchaAnswerReply.finished.connect(self.setCaptchaAnswerCommit) - else: - self.currentCommited += 1 - self.currentCaptchaID = None + if message: if message.startswith('OK') and '|' in message: parts = message.split('|') - creds = int(parts[1]) - self.currentCredits += creds - self.updateStats() - self.getCaptchaID() + if parts[1].isnumeric(): + self.currentCredits += int(parts[1]) + self.currentCommited += 1 + self.updateStats() + self.getCaptchaID() def setCaptchaAnswerSkipped(self): message = str(self.networkCaptchaAnswerReply.readAll(), encoding='utf-8') |