summaryrefslogtreecommitdiffstats
path: root/Plugins/Plugin.py
diff options
context:
space:
mode:
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']