From c1bad948e840243f4e1af1226d490043d3e01d78 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 25 Aug 2010 18:58:39 +0200 Subject: new icon, fixes --- module/plugins/accounts/ShareonlineBiz.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'module/plugins/accounts/ShareonlineBiz.py') diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py index 611fa759d..15802c8e2 100644 --- a/module/plugins/accounts/ShareonlineBiz.py +++ b/module/plugins/accounts/ShareonlineBiz.py @@ -30,17 +30,20 @@ class ShareonlineBiz(Account): __author_mail__ = ("mkaay@mkaay.de") def getAccountInfo(self, user): - req = self.core.requestFactory.getRequest(self.__name__, user) - src = req.load("https://www.share-online.biz/alpha/user/profile") - - validuntil = re.search(r"Account gültig bis:.*?(.*?)", src).group(1) - validuntil = int(mktime(strptime(validuntil, "%m/%d/%Y, %I:%M:%S %p"))) + try: + req = self.core.requestFactory.getRequest(self.__name__, user) + src = req.load("https://www.share-online.biz/alpha/user/profile") + + validuntil = re.search(r"Account gültig bis:.*?(.*?)", src).group(1) + validuntil = int(mktime(strptime(validuntil, "%m/%d/%Y, %I:%M:%S %p"))) + + out = Account.getAccountInfo(self, user) + tmp = {"validuntil":validuntil, "trafficleft":-1} + out.update(tmp) + return out + except: + return Account.getAccountInfo(self, user) - out = Account.getAccountInfo(self, user) - tmp = {"validuntil":validuntil, "trafficleft":-1} - out.update(tmp) - return out - def login(self, user, data): req = self.core.requestFactory.getRequest(self.__name__, user) post_vars = {"user": user, -- cgit v1.2.3