summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/RapidgatorNet.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/RapidgatorNet.py')
-rw-r--r--module/plugins/accounts/RapidgatorNet.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py
index 5ce51a1ec..f1177530f 100644
--- a/module/plugins/accounts/RapidgatorNet.py
+++ b/module/plugins/accounts/RapidgatorNet.py
@@ -9,7 +9,7 @@ from module.common.json_layer import json_loads
class RapidgatorNet(Account):
__name__ = "RapidgatorNet"
__type__ = "account"
- __version__ = "0.11"
+ __version__ = "0.15"
__status__ = "testing"
__description__ = """Rapidgator.net account plugin"""
@@ -17,17 +17,17 @@ class RapidgatorNet(Account):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- API_URL = "http://rapidgator.net/api/user"
+ API_URL = "http://rapidgator.net/api/user/"
- def parse_info(self, user, password, data, req):
+ def grab_info(self, user, password, data):
validuntil = None
trafficleft = None
premium = False
sid = None
try:
- sid = self.get_data(user).get('sid', None)
+ sid = data.get('sid', None)
assert sid
html = self.load(urlparse.urljoin(self.API_URL, "info"),
@@ -39,7 +39,7 @@ class RapidgatorNet(Account):
if json['response_status'] == 200:
if "reset_in" in json['response']:
- self.schedule_refresh(user, json['response']['reset_in'])
+ self._schedule_refresh(user, json['response']['reset_in'])
validuntil = json['response']['expire_date']
trafficleft = float(json['response']['traffic_left']) / 1024 #@TODO: Remove `/ 1024` in 0.4.10
@@ -56,7 +56,7 @@ class RapidgatorNet(Account):
'sid' : sid}
- def login(self, user, password, data, req):
+ def signin(self, user, password, data):
try:
html = self.load(urlparse.urljoin(self.API_URL, "login"),
post={'username': user,
@@ -75,4 +75,4 @@ class RapidgatorNet(Account):
except Exception, e:
self.log_error(e)
- self.login_fail()
+ self.fail_login()