summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/CaptchaBrotherhood.py
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-08-06 23:35:22 +0200
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-08-06 23:35:22 +0200
commit463616f77924b7cad96165c18e4e6f4fce1ca6da (patch)
treedd80a1c54246cca9d06cb77374ecdc82b89afa09 /module/plugins/hooks/CaptchaBrotherhood.py
parentupdated Serienjunkies, Shareonline - closed #571, #409 (diff)
downloadpyload-463616f77924b7cad96165c18e4e6f4fce1ca6da.tar.xz
fix bypasscaptcha, add imagetyperz
Diffstat (limited to 'module/plugins/hooks/CaptchaBrotherhood.py')
-rw-r--r--module/plugins/hooks/CaptchaBrotherhood.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/module/plugins/hooks/CaptchaBrotherhood.py b/module/plugins/hooks/CaptchaBrotherhood.py
index d03387527..d3c1dd043 100644
--- a/module/plugins/hooks/CaptchaBrotherhood.py
+++ b/module/plugins/hooks/CaptchaBrotherhood.py
@@ -44,14 +44,14 @@ class CaptchaBrotherhoodException(Exception):
class CaptchaBrotherhood(Hook):
__name__ = "CaptchaBrotherhood"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """send captchas to CaptchaBrotherhood.com"""
__config__ = [("activated", "bool", "Activated", False),
("username", "str", "Username", ""),
("force", "bool", "Force CT even if client is connected", False),
("passkey", "password", "Password", ""),]
- __author_name__ = ("RaNaN")
- __author_mail__ = ("RaNaN@pyload.org")
+ __author_name__ = ("RaNaN", "zoidberg")
+ __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz")
API_URL = "http://ocrhood.gazcad.com/"
@@ -86,7 +86,7 @@ class CaptchaBrotherhood(Hook):
url = "%ssendNewCaptcha.aspx?%s" % (self.API_URL,
urlencode({"username": self.getConfig("username"),
"password": self.getConfig("passkey"),
- "captchaSource": "jdPlugin",
+ "captchaSource": "pyLoad",
"timeout": "80"})
)
@@ -128,6 +128,9 @@ class CaptchaBrotherhood(Hook):
return response
def newCaptchaTask(self, task):
+ if "service" in task.data:
+ return False
+
if not task.isTextual():
return False
@@ -137,16 +140,16 @@ class CaptchaBrotherhood(Hook):
if self.core.isClientConnected() and not self.getConfig("force"):
return False
- print self.getCredits()
if self.getCredits() > 10:
task.handler.append(self)
+ task.data['service'] = self.__name__
task.setWaiting(100)
start_new_thread(self.processCaptcha, (task,))
else:
self.logInfo("Your CaptchaBrotherhood Account has not enough credits")
def captchaInvalid(self, task):
- if "ticket" in task.data:
+ if task.data['service'] == self.__name__ and "ticket" in task.data:
response = self.get_api("complainCaptcha", ticket)
def processCaptcha(self, task):