summaryrefslogtreecommitdiffstats
path: root/captcha
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2009-06-21 22:18:43 +0200
committerGravatar spoob <spoob@gmx.de> 2009-06-21 22:18:43 +0200
commit265af82f74fdab683d50791b54c82c210a6397b4 (patch)
tree3b9c67397c4260a43277f2f488c292df8201930f /captcha
parentplugin system changings (diff)
downloadpyload-265af82f74fdab683d50791b54c82c210a6397b4.tar.xz
Added Shareonline.biz captcha
Diffstat (limited to 'captcha')
-rw-r--r--captcha/ShareonlineBiz.py21
1 files changed, 21 insertions, 0 deletions
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')