diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-03 16:36:31 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-03 16:36:31 +0200 |
commit | 204796446348040433f9759b3b44f8445c342928 (patch) | |
tree | e3fbc817279009fb3272676c59e897d019f01ea6 /module/plugins/accounts | |
parent | HotfileCom fix (diff) | |
download | pyload-204796446348040433f9759b3b44f8445c342928.tar.xz |
shareonline premiumfix, ul login check
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/RapidshareCom.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/ShareonlineBiz.py | 23 | ||||
-rw-r--r-- | module/plugins/accounts/UploadedTo.py | 4 |
3 files changed, 13 insertions, 16 deletions
diff --git a/module/plugins/accounts/RapidshareCom.py b/module/plugins/accounts/RapidshareCom.py index ccc0d0fb2..683237674 100644 --- a/module/plugins/accounts/RapidshareCom.py +++ b/module/plugins/accounts/RapidshareCom.py @@ -55,7 +55,7 @@ class RapidshareCom(Account): api_param_prem = {"sub": "getaccountdetails_v1", "type": "prem", "login": user, "password": data["password"], "withcookie": 1} src = req.load(api_url_base, cookies=False, get=api_param_prem) if src.startswith("ERROR"): - raise Exception(src) + raise Exception(src+"### Note you have to use your account number for login, instead of name.") fields = src.split("\n") info = {} for t in fields: diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py index a85dbbe71..e6eaf6f27 100644 --- a/module/plugins/accounts/ShareonlineBiz.py +++ b/module/plugins/accounts/ShareonlineBiz.py @@ -29,22 +29,17 @@ class ShareonlineBiz(Account): __author_name__ = ("mkaay") __author_mail__ = ("mkaay@mkaay.de") - def getAccountInfo(self, user): - try: - req = self.core.requestFactory.getRequest(self.__name__, user) - src = req.load("http://www.share-online.biz/members.php?setlang=en") - validuntil = re.search(r'<td align="left"><b>Package Expire Date:</b></td>\s*<td align="left">(\d+/\d+/\d+</td>', src).group(1) - validuntil = int(mktime(strptime(validuntil, "%m/%d/%Y"))) - - out = Account.getAccountInfo(self, user) - tmp = {"validuntil":validuntil, "trafficleft":-1} - out.update(tmp) - return out - except: - return Account.getAccountInfo(self, user) + def loadAccountInfo(self, user): + req = self.getAccountRequest(user) + src = req.load("http://www.share-online.biz/members.php?setlang=en") + validuntil = re.search(r'<td align="left"><b>Package Expire Date:</b></td>\s*<td align="left">(\d+/\d+/\d+)</td>', src).group(1) + validuntil = int(mktime(strptime(validuntil, "%m/%d/%Y"))) + + tmp = {"validuntil":validuntil, "trafficleft":-1} + return tmp def login(self, user, data): - req = self.core.requestFactory.getRequest(self.__name__, user) + req = self.getAccountRequest(user) post_vars = { "act": "login", "location": "index.php", diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py index a783d9154..9b51f5aad 100644 --- a/module/plugins/accounts/UploadedTo.py +++ b/module/plugins/accounts/UploadedTo.py @@ -42,4 +42,6 @@ class UploadedTo(Account): def login(self, user, data): req = self.getAccountRequest() - req.load("http://uploaded.to/login", post={ "email" : user, "password" : data["password"]}, cookies=True) + page = req.load("http://uploaded.to/login", post={ "email" : user, "password" : data["password"]}, cookies=True) + if "Login failed!" in page: + self.wrongPassword() |