summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/CyberlockerCh.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-24 17:16:34 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-24 17:16:34 +0100
commit3ae2fbb170ad0f2bfe1ebf7f59e76d3645861f0a (patch)
treeb01e2c881aaf744aaab0af613a7a26e7129f2028 /module/plugins/accounts/CyberlockerCh.py
parententer captchas on webui (diff)
parentRapidgator: fixed bug #47 (diff)
downloadpyload-3ae2fbb170ad0f2bfe1ebf7f59e76d3645861f0a.tar.xz
Merge remote-tracking branch 'origin/stable'
Conflicts: module/plugins/accounts/FilesonicCom.py module/plugins/accounts/OronCom.py module/plugins/accounts/ShareonlineBiz.py module/plugins/addons/UpdateManager.py module/plugins/crypter/FilesonicComFolder.py module/plugins/hoster/BezvadataCz.py module/plugins/hoster/EuroshareEu.py module/plugins/hoster/FilesonicCom.py module/plugins/hoster/MegauploadCom.py module/plugins/hoster/Premium4Me.py module/plugins/hoster/YoutubeCom.py module/plugins/internal/MultiHoster.py module/utils.py
Diffstat (limited to 'module/plugins/accounts/CyberlockerCh.py')
-rw-r--r--module/plugins/accounts/CyberlockerCh.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/module/plugins/accounts/CyberlockerCh.py b/module/plugins/accounts/CyberlockerCh.py
new file mode 100644
index 000000000..31e0c3e24
--- /dev/null
+++ b/module/plugins/accounts/CyberlockerCh.py
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+from module.plugins.internal.XFSPAccount import XFSPAccount
+from module.plugins.internal.SimpleHoster import parseHtmlForm
+
+class CyberlockerCh(XFSPAccount):
+ __name__ = "CyberlockerCh"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """CyberlockerCh account plugin"""
+ __author_name__ = ("stickell")
+ __author_mail__ = ("l.stickell@yahoo.it")
+
+ MAIN_PAGE = "http://cyberlocker.ch/"
+
+ def login(self, user, data, req):
+ html = req.load(self.MAIN_PAGE + 'login.html', decode = True)
+
+ action, inputs = parseHtmlForm('name="FL"', html)
+ if not inputs:
+ inputs = {"op": "login",
+ "redirect": self.MAIN_PAGE}
+
+ inputs.update({"login": user,
+ "password": data['password']})
+
+ # Without this a 403 Forbidden is returned
+ req.http.lastURL = self.MAIN_PAGE + 'login.html'
+ html = req.load(self.MAIN_PAGE, post = inputs, decode = True)
+
+ if 'Incorrect Login or Password' in html or '>Error<' in html:
+ self.wrongPassword()