diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-13 15:56:57 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-13 15:56:57 +0100 |
commit | acc46fc3497a66a427b795b4a22c6e71d69185a1 (patch) | |
tree | 2d315b838a76435fc456b972c99c28d1732b2f70 /pyload/plugins/account/TurbobitNet.py | |
parent | Code fixes (diff) | |
download | pyload-acc46fc3497a66a427b795b4a22c6e71d69185a1.tar.xz |
Update
Diffstat (limited to 'pyload/plugins/account/TurbobitNet.py')
-rw-r--r-- | pyload/plugins/account/TurbobitNet.py | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/pyload/plugins/account/TurbobitNet.py b/pyload/plugins/account/TurbobitNet.py deleted file mode 100644 index b60c89a61..000000000 --- a/pyload/plugins/account/TurbobitNet.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import mktime, strptime - -from pyload.plugins.Account import Account - - -class TurbobitNet(Account): - __name = "TurbobitNet" - __type = "account" - __version = "0.01" - - __description = """TurbobitNet account plugin""" - __license = "GPLv3" - __authors = [("zoidberg", "zoidberg@mujmail.cz")] - - - def loadAccountInfo(self, user, req): - html = req.load("http://turbobit.net") - - m = re.search(r'<u>Turbo Access</u> to ([\d.]+)', html) - if m: - premium = True - validuntil = mktime(strptime(m.group(1), "%d.%m.%Y")) - else: - premium = False - validuntil = -1 - - return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} - - - 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() |