summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/RehostTo.py
diff options
context:
space:
mode:
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 00a45dedd..660bef07e 100644
--- a/module/plugins/accounts/RehostTo.py
+++ b/module/plugins/accounts/RehostTo.py
@@ -6,7 +6,7 @@ from module.plugins.Account import Account
class RehostTo(Account):
__name__ = "RehostTo"
__type__ = "account"
- __version__ = "0.11"
+ __version__ = "0.12"
__description__ = """Rehost.to account plugin"""
__license__ = "GPLv3"
@@ -17,8 +17,10 @@ class RehostTo(Account):
data = self.getAccountData(user)
html = req.load("http://rehost.to/api.php",
get={'cmd': "login", 'user': user, 'pass': data['password']})
+
data = [x.split("=") for x in html.split(",")]
- ses = data[0][1]
+
+ ses = data[0][1]
long_ses = data[1][1]
html = req.load("http://rehost.to/api.php",
@@ -39,7 +41,8 @@ class RehostTo(Account):
def login(self, user, data, req):
html = req.load("http://rehost.to/api.php",
- get={'cmd': "login", 'user': user, 'pass': data['password']})
+ get={'cmd': "login", 'user': user, 'pass': data['password']},
+ decode=True)
if "Login failed." in html:
self.wrongPassword()