summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/RehostTo.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-07 00:27:18 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-07 00:27:18 +0100
commit67587fbe0335cacfde28a86ba729b9d567ce1da7 (patch)
tree090ea3a41894437ce619fe06304508479ace6ab6 /module/plugins/accounts/RehostTo.py
parentPlugin code cosmetics (2) (diff)
downloadpyload-67587fbe0335cacfde28a86ba729b9d567ce1da7.tar.xz
Plugin code cosmetics (3)
Diffstat (limited to 'module/plugins/accounts/RehostTo.py')
-rw-r--r--module/plugins/accounts/RehostTo.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py
index 8046f84c0..16702e632 100644
--- a/module/plugins/accounts/RehostTo.py
+++ b/module/plugins/accounts/RehostTo.py
@@ -15,12 +15,14 @@ class RehostTo(Account):
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']))
+ page = req.load("http://rehost.to/api.php",
+ get={'cmd': "login", 'user': user, 'pass': 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)
+ page = req.load("http://rehost.to/api.php",
+ get={'cmd': "get_premium_credits", 'long_ses': long_ses})
traffic, valid = page.split(",")
account_info = {"trafficleft": int(traffic) * 1024,
@@ -32,7 +34,8 @@ class RehostTo(Account):
def login(self, user, data, req):
- page = req.load("http://rehost.to/api.php?cmd=login&user=%s&pass=%s" % (user, data['password']))
+ page = req.load("http://rehost.to/api.php",
+ get={'cmd': "login", 'user': user, 'pass': data['password']})
if "Login failed." in page:
self.wrongPassword()