diff options
author | Hadrien Theveneau <theveneau@gmail.com> | 2015-10-08 23:30:49 +0200 |
---|---|---|
committer | Hadrien Theveneau <theveneau@gmail.com> | 2015-10-28 02:52:21 +0100 |
commit | f8b71e503e5aecfa8245e8aacb587aa4e38f936a (patch) | |
tree | 383ea144d65df8c116c5de3d0082cda76727deee /module/plugins/internal/OCR.py | |
parent | Addition of some debug messages about captchas and plugins in DlProtectCom.py... (diff) | |
download | pyload-f8b71e503e5aecfa8245e8aacb587aa4e38f936a.tar.xz |
Correction of some errors in OCR.py
Diffstat (limited to 'module/plugins/internal/OCR.py')
-rw-r--r-- | module/plugins/internal/OCR.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/internal/OCR.py b/module/plugins/internal/OCR.py index 89eed1832..b4e28ca0f 100644 --- a/module/plugins/internal/OCR.py +++ b/module/plugins/internal/OCR.py @@ -65,7 +65,7 @@ class OCR(Plugin): output = popen.stdout.read() + " | " + popen.stderr.read() popen.stdout.close() popen.stderr.close() - self.pyload.log_debug("Tesseract ReturnCode " + popen.returncode, "Output: " + output) + self.log_debug("Tesseract ReturnCode %d" % popen.returncode, "Output: %s" % output) def run_tesser(self, subset=False, digits=True, lowercase=True, uppercase=True, pagesegmode=None): @@ -82,7 +82,7 @@ class OCR(Plugin): self.log_error(e) return - self.pyload.log_debug("Saving tiff...") + self.log_debug("Saving tiff...") self.image.save(tmpTif.name, 'TIFF') if os.name is "nt": @@ -111,9 +111,9 @@ class OCR(Plugin): tessparams.append("nobatch") tessparams.append(os.path.abspath(tmpSub.name)) - self.pyload.log_debug("Running tesseract...") + self.log_debug("Running tesseract...") self.run(tessparams) - self.pyload.log_debug("Reading txt...") + self.log_debug("Reading txt...") try: with open(tmpTxt.name, 'r') as f: @@ -122,7 +122,7 @@ class OCR(Plugin): except Exception: self.result_captcha = "" - self.pyload.log_info(_("OCR result: ") + self.result_captcha) + self.log_info(_("OCR result: ") + self.result_captcha) try: os.remove(tmpTif.name) os.remove(tmpTxt.name) |