summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-25 18:58:39 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-25 18:58:39 +0200
commitc1bad948e840243f4e1af1226d490043d3e01d78 (patch)
tree8614063aaf89de0788dd820353385420e76be8df /module/plugins/accounts
parentnew dirs (diff)
downloadpyload-c1bad948e840243f4e1af1226d490043d3e01d78.tar.xz
new icon, fixes
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/ShareonlineBiz.py23
1 files changed, 13 insertions, 10 deletions
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:.*?<span class='.*?'>(.*?)</span>", 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:.*?<span class='.*?'>(.*?)</span>", 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,