diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-11-15 07:26:01 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-11-15 07:26:01 +0100 |
commit | eb61d1bb0a30fd32f99b93f847346c610fbc91d2 (patch) | |
tree | f889dd1b19c0496f3f88c478445165abd98f9c7a /pyload/plugins/base/Captcha.py | |
parent | [HTTPRequest] Raise Fail if write response fails (diff) | |
download | pyload-eb61d1bb0a30fd32f99b93f847346c610fbc91d2.tar.xz |
Update plugins after merging
Diffstat (limited to 'pyload/plugins/base/Captcha.py')
-rw-r--r-- | pyload/plugins/base/Captcha.py | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/pyload/plugins/base/Captcha.py b/pyload/plugins/base/Captcha.py deleted file mode 100644 index 86b073710..000000000 --- a/pyload/plugins/base/Captcha.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from pyload.plugins.Plugin import Plugin - - -class Captcha(Plugin): - __name__ = "Captcha" - __version__ = "0.09" - - __description__ = """Base captcha service plugin""" - __authors__ = [("pyLoad Team", "admin@pyload.org")] - - - key = None - - KEY_PATTERN = None - - - def __init__(self, plugin): - self.plugin = plugin - - - def detect_key(self, html=None): - if not html: - if hasattr(self.plugin, "html") and self.plugin.html: - html = self.plugin.html - else: - errmsg = "%s html missing" % self.__name__ - self.plugin.fail(errmsg) - raise TypeError(errmsg) - - m = re.search(self.KEY_PATTERN, html) - if m: - self.key = m.group("KEY") - self.plugin.logDebug("%s key: %s" % (self.__name__, self.key)) - return self.key - else: - self.plugin.logDebug("%s key not found" % self.__name__) - return None - - - def challenge(self, key=None): - raise NotImplementedError - - - def result(self, server, challenge): - raise NotImplementedError |