diff options
author | mkaay <mkaay@mkaay.de> | 2010-08-25 16:39:54 +0200 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-08-25 16:39:54 +0200 |
commit | 9e1a4572a58a52d75c52de5fe04045981fcea88e (patch) | |
tree | 46eba3f59ebe0e2c5051d58876eadaf94387fa66 /module/plugins/accounts | |
parent | more cleanup (diff) | |
download | pyload-9e1a4572a58a52d75c52de5fe04045981fcea88e.tar.xz |
ul.to fetching, so.biz expire
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/ShareonlineBiz.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py index 3d213557a..611fa759d 100644 --- a/module/plugins/accounts/ShareonlineBiz.py +++ b/module/plugins/accounts/ShareonlineBiz.py @@ -18,19 +18,26 @@ """ from module.plugins.Account import Account +from time import strptime, mktime +import re class ShareonlineBiz(Account): __name__ = "ShareonlineBiz" - __version__ = "0.1" + __version__ = "0.2" __type__ = "account" __description__ = """share-online.biz account plugin""" __author_name__ = ("mkaay") __author_mail__ = ("mkaay@mkaay.de") - #@TODO: account info 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"))) + out = Account.getAccountInfo(self, user) - tmp = {"validuntil":None, "trafficleft":-1} + tmp = {"validuntil":validuntil, "trafficleft":-1} out.update(tmp) return out |