summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/accounts/TurbobitNet.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/accounts/TurbobitNet.py')
-rw-r--r--pyload/plugins/accounts/TurbobitNet.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/pyload/plugins/accounts/TurbobitNet.py b/pyload/plugins/accounts/TurbobitNet.py
index c4b819131..5d4471c30 100644
--- a/pyload/plugins/accounts/TurbobitNet.py
+++ b/pyload/plugins/accounts/TurbobitNet.py
@@ -17,10 +17,12 @@
@author: zoidberg
"""
-from module.plugins.Account import Account
import re
from time import mktime, strptime
+from module.plugins.Account import Account
+
+
class TurbobitNet(Account):
__name__ = "TurbobitNet"
__version__ = "0.01"
@@ -28,12 +30,12 @@ class TurbobitNet(Account):
__description__ = """TurbobitNet 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://turbobit.net")
-
+
found = re.search(r'<u>Turbo Access</u> to ([0-9.]+)', html)
if found:
premium = True
@@ -46,11 +48,11 @@ class TurbobitNet(Account):
def login(self, user, data, req):
req.cj.setCookie("turbobit.net", "user_lang", "en")
-
+
html = req.load("http://turbobit.net/user/login", post={
"user[login]": user,
"user[pass]": data["password"],
"user[submit]": "Login"})
-
+
if not '<div class="menu-item user-name">' in html:
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()