summaryrefslogtreecommitdiffstats
path: root/captcha/captcha.py
diff options
context:
space:
mode:
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