diff options
Diffstat (limited to 'pyload/plugins/accounts/StahnuTo.py')
-rw-r--r-- | pyload/plugins/accounts/StahnuTo.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/pyload/plugins/accounts/StahnuTo.py b/pyload/plugins/accounts/StahnuTo.py index 8a4523bc5..6e2b1c96d 100644 --- a/pyload/plugins/accounts/StahnuTo.py +++ b/pyload/plugins/accounts/StahnuTo.py @@ -17,9 +17,11 @@ @author: zoidberg """ +import re + from module.plugins.Account import Account from module.utils import parseFileSize -import re + class StahnuTo(Account): __name__ = "StahnuTo" @@ -28,22 +30,22 @@ class StahnuTo(Account): __description__ = """StahnuTo account plugin""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - + #login_timeout = 60 - def loadAccountInfo(self, user, req): + def loadAccountInfo(self, user, req): html = req.load("http://www.stahnu.to/") - + found = re.search(r'>VIP: (\d+.*)<', html) - trafficleft = parseFileSize(found.group(1)) * 1024 if found else 0 + trafficleft = parseFileSize(found.group(1)) * 1024 if found else 0 return {"premium": trafficleft > (512 * 1024), "trafficleft": trafficleft, "validuntil": -1} - def login(self, user, data, req): + def login(self, user, data, req): html = req.load("http://www.stahnu.to/login.php", post={ "username": user, "password": data["password"], "submit": "Login"}) - + if not '<a href="logout.php">' in html: - self.wrongPassword()
\ No newline at end of file + self.wrongPassword() |