summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hook
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/hook')
-rw-r--r--pyload/plugins/hook/BypassCaptcha.py4
-rw-r--r--pyload/plugins/hook/Captcha9kw.py3
-rw-r--r--pyload/plugins/hook/CaptchaBrotherhood.py4
-rw-r--r--pyload/plugins/hook/DeathByCaptcha.py4
-rw-r--r--pyload/plugins/hook/ExpertDecoders.py4
-rw-r--r--pyload/plugins/hook/ImageTyperz.py4
-rw-r--r--pyload/plugins/hook/XFileSharingPro.py16
7 files changed, 8 insertions, 31 deletions
diff --git a/pyload/plugins/hook/BypassCaptcha.py b/pyload/plugins/hook/BypassCaptcha.py
index 1a640ef87..c8842b1bf 100644
--- a/pyload/plugins/hook/BypassCaptcha.py
+++ b/pyload/plugins/hook/BypassCaptcha.py
@@ -48,10 +48,6 @@ class BypassCaptcha(Hook):
GETCREDITS_URL = "http://bypasscaptcha.com/ex_left.php"
- def setup(self):
- self.info = {} #@TODO: Remove in 0.4.10
-
-
def getCredits(self):
res = getURL(self.GETCREDITS_URL, post={"key": self.getConfig("passkey")})
diff --git a/pyload/plugins/hook/Captcha9kw.py b/pyload/plugins/hook/Captcha9kw.py
index ab5b802b0..d99ceeec3 100644
--- a/pyload/plugins/hook/Captcha9kw.py
+++ b/pyload/plugins/hook/Captcha9kw.py
@@ -40,8 +40,7 @@ class Captcha9kw(Hook):
API_URL = "http://www.9kw.eu/index.cgi"
- def setup(self):
- self.info = {} #@TODO: Remove in 0.4.10
+ def coreReady(self):
if self.getConfig("ssl"):
self.API_URL = self.API_URL.replace("http://", "https://")
diff --git a/pyload/plugins/hook/CaptchaBrotherhood.py b/pyload/plugins/hook/CaptchaBrotherhood.py
index 1b7e18c51..208462c14 100644
--- a/pyload/plugins/hook/CaptchaBrotherhood.py
+++ b/pyload/plugins/hook/CaptchaBrotherhood.py
@@ -54,10 +54,6 @@ class CaptchaBrotherhood(Hook):
API_URL = "http://www.captchabrotherhood.com/"
- def setup(self):
- self.info = {} #@TODO: Remove in 0.4.10
-
-
def getCredits(self):
res = getURL(self.API_URL + "askCredits.aspx",
get={"username": self.getConfig("username"), "password": self.getConfig("passkey")})
diff --git a/pyload/plugins/hook/DeathByCaptcha.py b/pyload/plugins/hook/DeathByCaptcha.py
index d032c964f..e4477565c 100644
--- a/pyload/plugins/hook/DeathByCaptcha.py
+++ b/pyload/plugins/hook/DeathByCaptcha.py
@@ -67,10 +67,6 @@ class DeathByCaptcha(Hook):
API_URL = "http://api.dbcapi.me/api/"
- def setup(self):
- self.info = {} #@TODO: Remove in 0.4.10
-
-
def call_api(self, api="captcha", post=False, multipart=False):
req = getRequest()
req.c.setopt(HTTPHEADER, ["Accept: application/json", "User-Agent: pyLoad %s" % self.core.version])
diff --git a/pyload/plugins/hook/ExpertDecoders.py b/pyload/plugins/hook/ExpertDecoders.py
index ed889319a..f57ef55bb 100644
--- a/pyload/plugins/hook/ExpertDecoders.py
+++ b/pyload/plugins/hook/ExpertDecoders.py
@@ -29,10 +29,6 @@ class ExpertDecoders(Hook):
API_URL = "http://www.fasttypers.org/imagepost.ashx"
- def setup(self):
- self.info = {} #@TODO: Remove in 0.4.10
-
-
def getCredits(self):
res = getURL(self.API_URL, post={"key": self.getConfig("passkey"), "action": "balance"})
diff --git a/pyload/plugins/hook/ImageTyperz.py b/pyload/plugins/hook/ImageTyperz.py
index ce6527fad..1c99d48c1 100644
--- a/pyload/plugins/hook/ImageTyperz.py
+++ b/pyload/plugins/hook/ImageTyperz.py
@@ -50,10 +50,6 @@ class ImageTyperz(Hook):
GETCREDITS_URL = "http://captchatypers.com/Forms/RequestBalance.ashx"
- def setup(self):
- self.info = {} #@TODO: Remove in 0.4.10
-
-
def getCredits(self):
res = getURL(self.GETCREDITS_URL,
post={'action': "REQUESTBALANCE",
diff --git a/pyload/plugins/hook/XFileSharingPro.py b/pyload/plugins/hook/XFileSharingPro.py
index 53033d8a4..520e30964 100644
--- a/pyload/plugins/hook/XFileSharingPro.py
+++ b/pyload/plugins/hook/XFileSharingPro.py
@@ -51,8 +51,7 @@ class XFileSharingPro(Hook):
def loadPattern(self):
use_builtin_list = self.getConfig('use_builtin_list')
- for type, plugin in (("hoster", "XFileSharingPro"),
- ("crypter", "XFileSharingProFolder")):
+ for type in ("hoster", "crypter"):
every_plugin = not self.getConfig("use_%s_list" % type)
if every_plugin:
@@ -69,7 +68,7 @@ class XFileSharingPro(Hook):
if not plugin_list:
self.logInfo(_("No %s to handle") % type)
- self._unload(type, plugin)
+ self._unload(type)
return
match_list = '|'.join(sorted(plugin_list))
@@ -79,20 +78,19 @@ class XFileSharingPro(Hook):
pattern = self.regexp[type][1] % match_list.replace('.', '\.')
- dict = self.core.pluginManager.plugins[type][plugin]
+ dict = self.core.pluginManager.plugins[type]["XFileSharingPro"]
dict['pattern'] = pattern
dict['re'] = re.compile(pattern)
self.logDebug("Loaded %s pattern: %s" % (type, pattern))
- def _unload(self, type, plugin):
- dict = self.core.pluginManager.plugins[type][plugin]
+ def _unload(self, type):
+ dict = self.core.pluginManager.plugins[type]["XFileSharingPro"]
dict['pattern'] = r'^unmatchable$'
dict['re'] = re.compile(dict['pattern'])
def unload(self):
- for type, plugin in (("hoster", "XFileSharingPro"),
- ("crypter", "XFileSharingProFolder")):
- self._unload(type, plugin)
+ for type in ("hoster", "crypter"):
+ self._unload(type, "XFileSharingPro")