diff options
author | Christopher <4Christopher@gmx.de> | 2013-03-26 19:23:41 +0100 |
---|---|---|
committer | Christopher <4Christopher@gmx.de> | 2013-03-26 19:23:41 +0100 |
commit | 866d30eb0e6a8868a4f2eb1da3c91734d6b9d716 (patch) | |
tree | 2233ea2329e779761abb5dc8e08afee97973dc61 /module/plugins/hooks | |
parent | Movie2kTo: Added setting for quality in the folder name. (diff) | |
parent | Merge pull request #53 from enkore/stable (diff) | |
download | pyload-866d30eb0e6a8868a4f2eb1da3c91734d6b9d716.tar.xz |
Merge branch 'stable' of git://github.com/pyload/pyload into stable
Diffstat (limited to 'module/plugins/hooks')
-rwxr-xr-x | module/plugins/hooks/Captcha9kw.py | 52 | ||||
-rw-r--r-- | module/plugins/hooks/DebridItaliaCom.py | 25 | ||||
-rw-r--r-- | module/plugins/hooks/ExtractArchive.py | 2 |
3 files changed, 51 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/DebridItaliaCom.py b/module/plugins/hooks/DebridItaliaCom.py new file mode 100644 index 000000000..8cd997f4d --- /dev/null +++ b/module/plugins/hooks/DebridItaliaCom.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- + +from module.plugins.internal.MultiHoster import MultiHoster + + +class DebridItaliaCom(MultiHoster): + __name__ = "DebridItaliaCom" + __version__ = "0.01" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", "False"), + ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("hosterList", "str", "Hoster list (comma separated)", ""), + ("unloadFailing", "bool", "Revert to standard download if download fails", "False"), + ("interval", "int", "Reload interval in hours (0 to disable)", "24")] + + __description__ = """Debriditalia.com hook plugin""" + __author_name__ = ("stickell") + __author_mail__ = ("l.stickell@yahoo.it") + + def getHoster(self): + return ["netload.in", "hotfile.com", "rapidshare.com", "multiupload.com", + "uploading.com", "megashares.com", "crocko.com", "filepost.com", + "bitshare.com", "share-links.biz", "putlocker.com", "uploaded.to", + "speedload.org", "rapidgator.net", "likeupload.net", "cyberlocker.ch", + "depositfiles.com", "extabit.com", "filefactory.com", "sharefiles.co"] 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) |