summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/Captcha.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugin/Captcha.py')
-rw-r--r--pyload/plugin/Captcha.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/pyload/plugin/Captcha.py b/pyload/plugin/Captcha.py
new file mode 100644
index 000000000..d7a506979
--- /dev/null
+++ b/pyload/plugin/Captcha.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+from pyload.plugin.Plugin import Base
+
+
+#@TODO: Extend Plugin class; remove all `html` args
+class Captcha(Base):
+ __name = "Captcha"
+ __type = "captcha"
+ __version = "0.25"
+
+ __description = """Base captcha service plugin"""
+ __license = "GPLv3"
+ __authors = [("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ def __init__(self, plugin):
+ self.plugin = plugin
+ self.key = None #: last key detected
+ super(Captcha, self).__init__(plugin.core)
+
+
+ def detect_key(self, html=None):
+ raise NotImplementedError
+
+
+ def challenge(self, key=None, html=None):
+ raise NotImplementedError
+
+
+ def result(self, server, challenge):
+ raise NotImplementedError