diff options
author | spoob <spoob@gmx.de> | 2009-06-21 22:18:43 +0200 |
---|---|---|
committer | spoob <spoob@gmx.de> | 2009-06-21 22:18:43 +0200 |
commit | 265af82f74fdab683d50791b54c82c210a6397b4 (patch) | |
tree | 3b9c67397c4260a43277f2f488c292df8201930f /captcha | |
parent | plugin system changings (diff) | |
download | pyload-265af82f74fdab683d50791b54c82c210a6397b4.tar.xz |
Added Shareonline.biz captcha
Diffstat (limited to 'captcha')
-rw-r--r-- | captcha/ShareonlineBiz.py | 21 |
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') |