summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/StahnuTo.py
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-07-23 20:22:42 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-07-23 20:22:42 +0200
commitf5535809bebc6cc343475704832c8fd8674d2d06 (patch)
treec59bc1e6d71c04f5545ea262056c0c5be1bd8910 /module/plugins/accounts/StahnuTo.py
parentFixed PEP 8 violations in Hosters (diff)
downloadpyload-f5535809bebc6cc343475704832c8fd8674d2d06.tar.xz
Fixed PEP 8 violations in Accounts
Diffstat (limited to 'module/plugins/accounts/StahnuTo.py')
-rw-r--r--module/plugins/accounts/StahnuTo.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/module/plugins/accounts/StahnuTo.py b/module/plugins/accounts/StahnuTo.py
index 8a4523bc5..6e2b1c96d 100644
--- a/module/plugins/accounts/StahnuTo.py
+++ b/module/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()