diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-17 23:18:27 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-17 23:18:27 +0200 |
commit | c5234a8b3d223f9860de161894ae8a4623e1ae05 (patch) | |
tree | d98aa17e3c0e738940e8957b390cd32e4b0955ee /captcha/NetloadIn.py | |
parent | added a error message if gui cant connect to server (diff) | |
download | pyload-c5234a8b3d223f9860de161894ae8a4623e1ae05.tar.xz |
plugins can import captcha method, see #6
Diffstat (limited to 'captcha/NetloadIn.py')
-rw-r--r-- | captcha/NetloadIn.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/captcha/NetloadIn.py b/captcha/NetloadIn.py index a8fc38757..94103f78b 100644 --- a/captcha/NetloadIn.py +++ b/captcha/NetloadIn.py @@ -1,10 +1,11 @@ -from captcha import Ocr +from captcha import OCR -class NetloadIn(Ocr): - def __init__(self, image): - Ocr.__init__(self, image) +class NetloadIn(OCR): + def __init__(self): + OCR.__init__(self) - def get_captcha(self): + def get_captcha(self, image): + self.load_image(image) self.to_greyscale() self.clean(3) self.clean(3) @@ -12,5 +13,5 @@ class NetloadIn(Ocr): return self.result_captcha if __name__ == '__main__': - ocr = NetloadIn('captchas/netload/captcha.php10.png') - print ocr.get_captcha() + ocr = NetloadIn() + print ocr.get_captcha('captchas/netload/captcha.php10.png') |