diff options
author | stickell <l.stickell@yahoo.it> | 2015-02-08 14:28:31 +0100 |
---|---|---|
committer | stickell <l.stickell@yahoo.it> | 2015-02-08 14:28:31 +0100 |
commit | c02543ecc3436972b5d34325787c41a5c2884dd5 (patch) | |
tree | 09bfdc9a4e34be1875e8db9ab0df2eab9b13bb0f | |
parent | [ExternalScripts] Wait option (2) (diff) | |
download | pyload-c02543ecc3436972b5d34325787c41a5c2884dd5.tar.xz |
[UptoboxCom] Fixed login
Fixes #1047
-rw-r--r-- | module/plugins/accounts/UptoboxCom.py | 3 | ||||
-rw-r--r-- | module/plugins/internal/XFSAccount.py | 12 |
2 files changed, 10 insertions, 5 deletions
diff --git a/module/plugins/accounts/UptoboxCom.py b/module/plugins/accounts/UptoboxCom.py index 299a0acc2..c40dbd6e6 100644 --- a/module/plugins/accounts/UptoboxCom.py +++ b/module/plugins/accounts/UptoboxCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount class UptoboxCom(XFSAccount): __name__ = "UptoboxCom" __type__ = "account" - __version__ = "0.07" + __version__ = "0.08" __description__ = """DDLStorage.com account plugin""" __license__ = "GPLv3" @@ -15,3 +15,4 @@ class UptoboxCom(XFSAccount): HOSTER_DOMAIN = "uptobox.com" HOSTER_URL = "https://uptobox.com/" + LOGIN_URL = "https://login.uptobox.com/" diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py index c3bd91e52..845ea3230 100644 --- a/module/plugins/internal/XFSAccount.py +++ b/module/plugins/internal/XFSAccount.py @@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import parseHtmlForm, set_cookies class XFSAccount(Account): __name__ = "XFSAccount" __type__ = "account" - __version__ = "0.35" + __version__ = "0.36" __description__ = """XFileSharing account plugin""" __license__ = "GPLv3" @@ -22,6 +22,7 @@ class XFSAccount(Account): HOSTER_DOMAIN = None HOSTER_URL = None + LOGIN_URL = None COOKIES = True @@ -158,8 +159,9 @@ class XFSAccount(Account): if not self.HOSTER_URL: #@TODO: Remove in 0.4.10 raise Exception(_("Missing HOSTER_DOMAIN")) - url = urljoin(self.HOSTER_URL, "login.html") - html = req.load(url, decode=True) + if not self.LOGIN_URL: + self.LOGIN_URL = urljoin(self.HOSTER_URL, "login.html") + html = req.load(self.LOGIN_URL, decode=True) action, inputs = parseHtmlForm('name="FL"', html) if not inputs: @@ -169,7 +171,9 @@ class XFSAccount(Account): inputs.update({'login' : user, 'password': data['password']}) - html = req.load(self.HOSTER_URL, post=inputs, decode=True) + if not action: + action = self.HOSTER_URL + html = req.load(action, post=inputs, decode=True) if re.search(self.LOGIN_FAIL_PATTERN, html): self.wrongPassword() |