summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-03-23 22:32:28 +0100
committerGravatar Stefano <l.stickell@yahoo.it> 2013-03-23 22:32:28 +0100
commit8342aad089589479650703de915a356d634b202b (patch)
treeb94ad36b3f2e956df552ceb5ae185afe81454052 /module/plugins/hooks
parentNew debrid: DebridItaliaCom (diff)
downloadpyload-8342aad089589479650703de915a356d634b202b.tar.xz
Plugins: fixed inconsistent indentation
Diffstat (limited to 'module/plugins/hooks')
-rwxr-xr-xmodule/plugins/hooks/Captcha9kw.py52
-rw-r--r--module/plugins/hooks/ExtractArchive.py2
2 files changed, 26 insertions, 28 deletions
diff --git a/module/plugins/hooks/Captcha9kw.py b/module/plugins/hooks/Captcha9kw.py
index b34ffeb05..a01ce9576 100755
--- a/module/plugins/hooks/Captcha9kw.py
+++ b/module/plugins/hooks/Captcha9kw.py
@@ -62,40 +62,40 @@ class Captcha9kw(Hook):
data = b64encode(data)
self.logDebug("%s : %s" % (task.captchaFile, data))
if task.isPositional():
- mouse = 1
+ mouse = 1
else:
- mouse = 0
+ mouse = 0
response = getURL(self.API_URL, post = {
- "apikey": self.getConfig("passkey"),
- "pyload": "1",
- "source": "pyload",
- "base64": "1",
- "mouse": mouse,
- "file-upload-01": data,
- "action": "usercaptchaupload" })
+ "apikey": self.getConfig("passkey"),
+ "pyload": "1",
+ "source": "pyload",
+ "base64": "1",
+ "mouse": mouse,
+ "file-upload-01": data,
+ "action": "usercaptchaupload" })
- if response.isdigit():
- self.logInfo(_("NewCaptchaID from upload: %s : %s" % (response,task.captchaFile)))
+ if response.isdigit():
+ self.logInfo(_("NewCaptchaID from upload: %s : %s" % (response,task.captchaFile)))
- for i in range(1, 200, 2):
- response2 = getURL(self.API_URL, get = { "apikey": self.getConfig("passkey"), "id": response,"pyload": "1","source": "pyload", "action": "usercaptchacorrectdata" })
+ for i in range(1, 200, 2):
+ response2 = getURL(self.API_URL, get = { "apikey": self.getConfig("passkey"), "id": response,"pyload": "1","source": "pyload", "action": "usercaptchacorrectdata" })
- if(response2 != ""):
- break;
+ if(response2 != ""):
+ break;
- time.sleep(1)
+ time.sleep(1)
- result = response2
- task.data["ticket"] = response
- self.logInfo("result %s : %s" % (response, result))
- task.setResult(result)
- else:
- self.logError("Bad upload: %s" % response)
- return False
+ result = response2
+ task.data["ticket"] = response
+ self.logInfo("result %s : %s" % (response, result))
+ task.setResult(result)
+ else:
+ self.logError("Bad upload: %s" % response)
+ return False
def newCaptchaTask(self, task):
- if not task.isTextual() and not task.isPositional():
+ if not task.isTextual() and not task.isPositional():
return False
if not self.getConfig("passkey"):
@@ -130,7 +130,7 @@ class Captcha9kw(Hook):
except BadHeader, e:
self.logError("Could not send correct request.", str(e))
else:
- self.logError("No CaptchaID for correct request (task %s) found." % task)
+ self.logError("No CaptchaID for correct request (task %s) found." % task)
def captchaInvalid(self, task):
if "ticket" in task.data:
@@ -150,4 +150,4 @@ class Captcha9kw(Hook):
except BadHeader, e:
self.logError("Could not send refund request.", str(e))
else:
- self.logError("No CaptchaID for not correct request (task %s) found." % task) \ No newline at end of file
+ self.logError("No CaptchaID for not correct request (task %s) found." % task)
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py
index c789495ca..a5a973b7f 100644
--- a/module/plugins/hooks/ExtractArchive.py
+++ b/module/plugins/hooks/ExtractArchive.py
@@ -196,8 +196,6 @@ class ExtractArchive(Hook):
files_ids = new_files_ids # also check extracted files
if not matched: self.logInfo(_("No files found to extract"))
-
-
def startExtracting(self, plugin, fid, passwords, thread):
pyfile = self.core.files.getFile(fid)