From 265af82f74fdab683d50791b54c82c210a6397b4 Mon Sep 17 00:00:00 2001
From: spoob <spoob@gmx.de>
Date: Sun, 21 Jun 2009 22:18:43 +0200
Subject: Added Shareonline.biz captcha

---
 captcha/ShareonlineBiz.py | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 captcha/ShareonlineBiz.py

(limited to 'captcha')

diff --git a/captcha/ShareonlineBiz.py b/captcha/ShareonlineBiz.py
new file mode 100644
index 000000000..038f6639e
--- /dev/null
+++ b/captcha/ShareonlineBiz.py
@@ -0,0 +1,21 @@
+from captcha import OCR
+import urllib
+
+class ShareonlineBiz(OCR):
+    def __init__(self):
+        OCR.__init__(self)
+        
+    def get_captcha(self, image):
+        urllib.urlretrieve("http://www.share-online.biz/captcha.php", "captcha.jpeg") 
+        self.load_image(image)
+        #self.to_greyscale()
+        #self.image.save('grey.jpeg')
+        self.image.threshold(32500)
+        #self.threshold(1.3)
+        self.run_tesser()
+        self.image.save('captcha_bla.jpeg')
+        return self.result_captcha
+
+if __name__ == '__main__':
+    ocr = ShareonlineBiz()
+    print  ocr.get_captcha('captcha.jpeg')
-- 
cgit v1.2.3