diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-03 19:58:02 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-03 19:58:02 +0200 |
commit | 43e6a6376625ac73067403ddae3b45a80618d6c8 (patch) | |
tree | ceb458c3da1f19e0a91731bc254ee3a158682d0b /pyload/plugins/accounts/RehostTo.py | |
parent | [ConfigParser] Remove IGNORE feature (diff) | |
download | pyload-43e6a6376625ac73067403ddae3b45a80618d6c8.tar.xz |
Rename accounts directory to account
Diffstat (limited to 'pyload/plugins/accounts/RehostTo.py')
-rw-r--r-- | pyload/plugins/accounts/RehostTo.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/pyload/plugins/accounts/RehostTo.py b/pyload/plugins/accounts/RehostTo.py deleted file mode 100644 index 0414ad581..000000000 --- a/pyload/plugins/accounts/RehostTo.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account - - -class RehostTo(Account): - __name__ = "RehostTo" - __type__ = "account" - __version__ = "0.1" - - __description__ = """Rehost.to account plugin""" - __author_name__ = "RaNaN" - __author_mail__ = "RaNaN@pyload.org" - - - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) - page = req.load("http://rehost.to/api.php?cmd=login&user=%s&pass=%s" % (user, data['password'])) - data = [x.split("=") for x in page.split(",")] - ses = data[0][1] - long_ses = data[1][1] - - page = req.load("http://rehost.to/api.php?cmd=get_premium_credits&long_ses=%s" % long_ses) - traffic, valid = page.split(",") - - account_info = {"trafficleft": int(traffic) * 1024, - "validuntil": int(valid), - "long_ses": long_ses, - "ses": ses} - - return account_info - - def login(self, user, data, req): - page = req.load("http://rehost.to/api.php?cmd=login&user=%s&pass=%s" % (user, data['password'])) - - if "Login failed." in page: - self.wrongPassword() |