summaryrefslogtreecommitdiffstats
path: root/Plugins/Plugin.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-17 23:18:27 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-17 23:18:27 +0200
commitc5234a8b3d223f9860de161894ae8a4623e1ae05 (patch)
treed98aa17e3c0e738940e8957b390cd32e4b0955ee /Plugins/Plugin.py
parentadded a error message if gui cant connect to server (diff)
downloadpyload-c5234a8b3d223f9860de161894ae8a4623e1ae05.tar.xz
plugins can import captcha method, see #6
Diffstat (limited to 'Plugins/Plugin.py')
-rw-r--r--Plugins/Plugin.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py
index a253ffb74..adcaa7678 100644
--- a/Plugins/Plugin.py
+++ b/Plugins/Plugin.py
@@ -26,6 +26,7 @@ class Plugin():
self.time_plus_wait = 0 #time() + wait in seconds
self.want_reconnect = False
self.multi_dl = True
+ self.ocr = None #captcha reader instance
def set_parent_status(self):
""" sets all available Statusinfos about a File in self.parent.status
@@ -74,5 +75,10 @@ class Plugin():
self.config[option] = self.parser.get(self.props['name'], option, raw=True)
self.config[option] = False if self.config[option].lower() == 'false' else self.config[option]
+ def init_ocr(self):
+ modul = __import__("captcha."+ self.props['name'])
+ captchaClass = getattr(modul, self.props['name'])
+ self.ocr = captchaClass()
+
def __call__(self):
- return self.props['name'] \ No newline at end of file
+ return self.props['name']