summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/TurbobitNet.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/TurbobitNet.py')
-rw-r--r--module/plugins/accounts/TurbobitNet.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/accounts/TurbobitNet.py b/module/plugins/accounts/TurbobitNet.py
index 206e7874f..c3edd0c09 100644
--- a/module/plugins/accounts/TurbobitNet.py
+++ b/module/plugins/accounts/TurbobitNet.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Plugin import set_cookie
class TurbobitNet(Account):
__name__ = "TurbobitNet"
__type__ = "account"
- __version__ = "0.05"
+ __version__ = "0.07"
__status__ = "testing"
__description__ = """TurbobitNet account plugin"""
@@ -18,11 +18,11 @@ class TurbobitNet(Account):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- def parse_info(self, user, password, data, req):
+ def grab_info(self, user, password, data):
html = self.load("http://turbobit.net")
m = re.search(r'<u>Turbo Access</u> to ([\d.]+)', html)
- if m:
+ if m is not None:
premium = True
validuntil = time.mktime(time.strptime(m.group(1), "%d.%m.%Y"))
else:
@@ -32,8 +32,8 @@ class TurbobitNet(Account):
return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil}
- def login(self, user, password, data, req):
- set_cookie(req.cj, "turbobit.net", "user_lang", "en")
+ def signin(self, user, password, data):
+ set_cookie(self.req.cj, "turbobit.net", "user_lang", "en")
html = self.load("http://turbobit.net/user/login",
post={"user[login]" : user,
@@ -41,4 +41,4 @@ class TurbobitNet(Account):
"user[submit]": "Login"})
if not '<div class="menu-item user-name">' in html:
- self.login_fail()
+ self.fail_login()