summaryrefslogtreecommitdiffstats
path: root/captcha/captcha.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-24 13:43:22 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-24 13:43:22 +0200
commit04b1015aa6ceefd3735de21d21519eb01316f1dc (patch)
tree7dccfce9d421b22cf846d41cebf3d6af1dd85c1c /captcha/captcha.py
parentfixed some bugs (diff)
downloadpyload-04b1015aa6ceefd3735de21d21519eb01316f1dc.tar.xz
fixed occasionally appearing cli bug, catpcha method for sharebiz @ ~60%
Diffstat (limited to 'captcha/captcha.py')
-rw-r--r--captcha/captcha.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/captcha/captcha.py b/captcha/captcha.py
index 48816940d..7092e21c1 100644
--- a/captcha/captcha.py
+++ b/captcha/captcha.py
@@ -216,8 +216,10 @@ class OCR(object):
if black_pixel_in_col == False and started == True:
rect = (firstX, topY, lastX, bottomY)
new_captcha = captcha.crop(rect)
-
- letters.append(new_captcha)
+
+ w, h = new_captcha.size
+ if w > 5 and h > 5:
+ letters.append(new_captcha)
started = False
bottomY, topY = 0, height