diff options
Diffstat (limited to 'module/plugins/accounts/StahnuTo.py')
-rw-r--r-- | module/plugins/accounts/StahnuTo.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/module/plugins/accounts/StahnuTo.py b/module/plugins/accounts/StahnuTo.py index adc7ab789..ed8df3b77 100644 --- a/module/plugins/accounts/StahnuTo.py +++ b/module/plugins/accounts/StahnuTo.py @@ -8,7 +8,7 @@ from pyload.plugin.Account import Account class StahnuTo(Account): __name__ = "StahnuTo" __type__ = "account" - __version__ = "0.03" + __version__ = "0.05" __description__ = """StahnuTo account plugin""" __license__ = "GPLv3" @@ -19,16 +19,17 @@ class StahnuTo(Account): html = req.load("http://www.stahnu.to/") m = re.search(r'>VIP: (\d+.*)<', html) - trafficleft = self.parseTraffic(m.group(1)) * 1024 if m else 0 + trafficleft = self.parseTraffic(m.group(1)) if m else 0 - return {"premium": trafficleft > (512 * 1024), "trafficleft": trafficleft, "validuntil": -1} + return {"premium": trafficleft > 512, "trafficleft": trafficleft, "validuntil": -1} def login(self, user, data, req): - html = req.load("http://www.stahnu.to/login.php", post={ - "username": user, - "password": data['password'], - "submit": "Login"}) + html = req.load("http://www.stahnu.to/login.php", + post={"username": user, + "password": data['password'], + "submit": "Login"}, + decode=True) if not '<a href="logout.php">' in html: self.wrongPassword() |