From 204796446348040433f9759b3b44f8445c342928 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 3 Oct 2010 16:36:31 +0200 Subject: shareonline premiumfix, ul login check --- module/plugins/accounts/ShareonlineBiz.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'module/plugins/accounts/ShareonlineBiz.py') 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'Package Expire Date:\s*(\d+/\d+/\d+', 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'Package Expire Date:\s*(\d+/\d+/\d+)', 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", -- cgit v1.2.3