summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/MegaRapidCz.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/MegaRapidCz.py')
-rw-r--r--module/plugins/accounts/MegaRapidCz.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/module/plugins/accounts/MegaRapidCz.py b/module/plugins/accounts/MegaRapidCz.py
index ce2d78994..050e3e4c6 100644
--- a/module/plugins/accounts/MegaRapidCz.py
+++ b/module/plugins/accounts/MegaRapidCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class MegaRapidCz(Account):
__name__ = "MegaRapidCz"
__type__ = "account"
- __version__ = "0.37"
+ __version__ = "0.39"
__status__ = "testing"
__description__ = """MegaRapid.cz account plugin"""
@@ -25,28 +25,27 @@ class MegaRapidCz(Account):
TRAFFIC_LEFT_PATTERN = r'<tr><td>Kredit</td><td>(.*?) GiB'
- def parse_info(self, user, password, data, req):
+ def grab_info(self, user, password, data):
htmll = self.load("http://megarapid.cz/mujucet/")
m = re.search(self.LIMITDL_PATTERN, htmll)
- if m:
- data = self.get_data(user)
+ if m is not None:
data['options']['limitDL'] = [int(m.group(1))]
m = re.search(self.VALID_UNTIL_PATTERN, htmll)
- if m:
+ if m is not None:
validuntil = time.mktime(time.strptime(m.group(1), "%d.%m.%Y - %H:%M"))
return {'premium': True, 'trafficleft': -1, 'validuntil': validuntil}
m = re.search(self.TRAFFIC_LEFT_PATTERN, htmll)
- if m:
+ if m is not None:
trafficleft = float(m.group(1)) * (1 << 20)
return {'premium': True, 'trafficleft': trafficleft, 'validuntil': -1}
return {'premium': False, 'trafficleft': None, 'validuntil': None}
- def login(self, user, password, data, req):
+ def signin(self, user, password, data):
html = self.load("http://megarapid.cz/prihlaseni/")
if "Heslo:" in html: