diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-10 00:27:59 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-10 00:27:59 +0100 |
commit | 522d50d401a6ed4a1d41d9b55844f9035c49b29c (patch) | |
tree | 7ccb384f741f3283778e4062139c0984da56636e /module/plugins/accounts | |
parent | [MegaCoNz][MegaCoNzFolder] Improve __pattern__ (diff) | |
download | pyload-522d50d401a6ed4a1d41d9b55844f9035c49b29c.tar.xz |
[PremiumTo] Parse Special Traffic
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/PremiumTo.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/plugins/accounts/PremiumTo.py b/module/plugins/accounts/PremiumTo.py index ea6fbbf65..c8ea2fa26 100644 --- a/module/plugins/accounts/PremiumTo.py +++ b/module/plugins/accounts/PremiumTo.py @@ -6,7 +6,7 @@ from module.plugins.Account import Account class PremiumTo(Account): __name__ = "PremiumTo" __type__ = "account" - __version__ = "0.07" + __version__ = "0.08" __description__ = """Premium.to account plugin""" __license__ = "GPLv3" @@ -16,11 +16,11 @@ class PremiumTo(Account): def loadAccountInfo(self, user, req): - traffic = req.load("http://premium.to/api/traffic.php", + traffic = req.load("http://premium.to/api/straffic.php", get={'username': self.username, 'password': self.password}) if "wrong username" not in traffic: - trafficleft = float(traffic.strip()) / 1024 #@TODO: Remove `/ 1024` in 0.4.10 + trafficleft = sum(map(float, traffic.split(';'))) / 1024 #@TODO: Remove `/ 1024` in 0.4.10 return {'premium': True, 'trafficleft': trafficleft, 'validuntil': -1} else: return {'premium': False, 'trafficleft': None, 'validuntil': None} |