From 04b1015aa6ceefd3735de21d21519eb01316f1dc Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 24 Jun 2009 13:43:22 +0200 Subject: fixed occasionally appearing cli bug, catpcha method for sharebiz @ ~60% --- captcha/captcha.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'captcha/captcha.py') 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 -- cgit v1.2.3