From c299c5b36baf75c8624e47e37b4c836c60787557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Thu, 7 Apr 2016 14:25:35 +0200 Subject: Remove legacy (click support on captcha) --- 9kwpyqt.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/9kwpyqt.py b/9kwpyqt.py index b3b7359..d68a1b9 100755 --- a/9kwpyqt.py +++ b/9kwpyqt.py @@ -84,7 +84,6 @@ class CaptchaGUI(QWidget): QSizePolicy.MinimumExpanding, QSizePolicy.MinimumExpanding ) - self.captchaImage.clicked.connect(self.captchaClicked) self.captchaBox = QHBoxLayout() self.captchaBox.addWidget(self.captchaImage) @@ -140,13 +139,6 @@ class CaptchaGUI(QWidget): ################################################## # Handle gui ################################################## - def captchaClicked(self, clickedpiece, separator): - text = self.captchaInputLine.text() - if len(text) > 0 and separator: - text += separator - text += str(clickedpiece) - self.captchaInputLine.setText(text) - def updateStats(self): if self.startCredits: credittext = "%d ¥ (%s%d)" % (self.currentCredits, (self.currentCredits - self.startCredits > 0) and '+' or '', (self.currentCredits - self.startCredits)) @@ -347,13 +339,9 @@ class CaptchaGUI(QWidget): self.running = False self.setCaptchaAnswer("", skip=True, queue=False) - def main(): - # NOTE(andre): urlopen() will first try ipv6, if available - # hacky way to remove IPv6: http://stackoverflow.com/questions/2014534/force-python-mechanize-urllib2-to-only-use-a-requests/6319043 - # better way: disable IPv6, if your isp does not support it - # import pudb; pudb.set_trace() + app = QApplication(sys.argv) screen = CaptchaGUI() screen.show() -- cgit v1.2.3