summaryrefslogtreecommitdiffstats
path: root/core/module/plugins/captcha/GigasizeCom.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-08-25 16:48:55 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-08-25 16:48:55 +0200
commit3c9f55270a83b0e88ec0dc516f9d9921e4d7b6ea (patch)
treec5b2b1bfeb7eb8df2b97be118f6cbcec4e29cb3b /core/module/plugins/captcha/GigasizeCom.py
parentul.to fetching, so.biz expire (diff)
downloadpyload-3c9f55270a83b0e88ec0dc516f9d9921e4d7b6ea.tar.xz
merged gui
Diffstat (limited to 'core/module/plugins/captcha/GigasizeCom.py')
-rw-r--r--core/module/plugins/captcha/GigasizeCom.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/module/plugins/captcha/GigasizeCom.py b/core/module/plugins/captcha/GigasizeCom.py
new file mode 100644
index 000000000..d31742eb5
--- /dev/null
+++ b/core/module/plugins/captcha/GigasizeCom.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from captcha import OCR
+
+class GigasizeCom(OCR):
+ def __init__(self):
+ OCR.__init__(self)
+
+ def get_captcha(self, image):
+ self.load_image(image)
+ self.threshold(2.8)
+ self.run_tesser(True, False, False, True)
+ return self.result_captcha
+
+if __name__ == '__main__':
+ ocr = GigasizeCom()
+ import urllib
+ urllib.urlretrieve('http://www.gigasize.com/randomImage.php', "gigasize_tmp.jpg")
+
+ print ocr.get_captcha('gigasize_tmp.jpg')