summaryrefslogtreecommitdiffstats
path: root/module/plugins/captcha
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-01 18:57:18 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-01 18:57:18 +0200
commit4ebe6b095e66caa5764e08486aeac46b32df0866 (patch)
treed4687f7ebcc203d039708264d5058a11908e2ed8 /module/plugins/captcha
parentocr + db fix (diff)
downloadpyload-4ebe6b095e66caa5764e08486aeac46b32df0866.tar.xz
wait fix
Diffstat (limited to 'module/plugins/captcha')
-rw-r--r--module/plugins/captcha/captcha.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/plugins/captcha/captcha.py b/module/plugins/captcha/captcha.py
index 501a57737..8b3b4ccbc 100644
--- a/module/plugins/captcha/captcha.py
+++ b/module/plugins/captcha/captcha.py
@@ -83,9 +83,9 @@ class OCR(object):
self.result_captcha = self.run(['gocr', tmp.name]).replace("\n", "")
def run_tesser(self, subset=False, digits=True, lowercase=True, uppercase=True):
- self.logger.debug("create tmp tif")
+ #self.logger.debug("create tmp tif")
tmp = tempfile.NamedTemporaryFile(suffix=".tif")
- self.logger.debug("create tmp txt")
+ #self.logger.debug("create tmp txt")
tmpTxt = tempfile.NamedTemporaryFile(suffix=".txt")
self.logger.debug("save tiff")
self.image.save(tmp.name, 'TIFF')
@@ -93,7 +93,7 @@ class OCR(object):
tessparams = ['tesseract', tmp.name, tmpTxt.name.replace(".txt", "")]
if subset and (digits or lowercase or uppercase):
- self.logger.debug("create temp subset config")
+ #self.logger.debug("create temp subset config")
tmpSub = tempfile.NamedTemporaryFile(suffix=".subset")
tmpSub.write("tessedit_char_whitelist ")
if digits:
@@ -114,6 +114,7 @@ class OCR(object):
with open(tmpTxt.name, 'r') as f:
self.result_captcha = f.read().replace("\n", "")
+ self.logger.debug(self.result_captcha)
def get_captcha(self):
raise NotImplementedError