summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2016-03-23 09:26:06 +0100
committerAndré Glüpker <git@wgmd.de>2016-03-23 09:26:06 +0100
commit267fa7724bdc91a1749fbdd8e54f38f18f895f7e (patch)
tree2e1761f0669894ca1b8d962f3ce05cf54efb51a6
parentc59a23e3991793edf2ed6e3159cbaeb70ecb6e22 (diff)
download9kwpyqt-267fa7724bdc91a1749fbdd8e54f38f18f895f7e.tar.gz
9kwpyqt-267fa7724bdc91a1749fbdd8e54f38f18f895f7e.tar.bz2
9kwpyqt-267fa7724bdc91a1749fbdd8e54f38f18f895f7e.zip
Add another Type1-Captcha
white box has other dimensions for "street sign" and "street names"
-rwxr-xr-x9kwpyqt.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/9kwpyqt.py b/9kwpyqt.py
index f6e1635..9944a28 100755
--- a/9kwpyqt.py
+++ b/9kwpyqt.py
@@ -90,9 +90,11 @@ class ExtendedQLabel(QLabel):
# Which type of captcha is this image?
if PixelInfo(self.imageB.pixel(90, 45)).isExactly(0,0,0) and \
PixelInfo(self.imageB.pixel( 5, 30)).isHigher(220,220,220) and \
- PixelInfo(self.imageB.pixel(71, 30)).isHigher(220,220,220) and \
PixelInfo(self.imageB.pixel(40, 5)).isHigher(220,220,220) and \
- PixelInfo(self.imageB.pixel(40, 59)).isHigher(220,220,220):
+ (PixelInfo(self.imageB.pixel(58, 30)).isHigher(220,220,220) or \
+ PixelInfo(self.imageB.pixel(71, 30)).isHigher(220,220,220)) and \
+ (PixelInfo(self.imageB.pixel(40, 59)).isHigher(220,220,220) or \
+ PixelInfo(self.imageB.pixel(40, 60)).isHigher(220,220,220)):
self.captchaType = 1
elif PixelInfo(self.imageB.pixel( 16, 47)).isLower(20,20,20) and \
PixelInfo(self.imageB.pixel(144, 47)).isLower(20,20,20) and \