From 97d25752691aa561c29a91166fdd30302bef2db2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 00:54:03 +0200 Subject: [Account] parse_info -> grab_info --- module/plugins/accounts/MegasharesCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/MegasharesCom.py') diff --git a/module/plugins/accounts/MegasharesCom.py b/module/plugins/accounts/MegasharesCom.py index ec43b7fc0..bad3f5896 100644 --- a/module/plugins/accounts/MegasharesCom.py +++ b/module/plugins/accounts/MegasharesCom.py @@ -20,7 +20,7 @@ class MegasharesCom(Account): VALID_UNTIL_PATTERN = r'

Period Ends: (\w{3} \d{1,2}, \d{4})

' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): # self.relogin(user) html = self.load("http://d01.megashares.com/myms.php") @@ -45,4 +45,4 @@ class MegasharesCom(Account): 'mymspassword' : password}) if not '%s' % user in html: - self.login_fail() + self.fail_login() -- cgit v1.2.3 From f9fc367427e30b7a3ca2ccad6144cb76b21f0257 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 14:36:22 +0200 Subject: Spare code cosmetics --- module/plugins/accounts/MegasharesCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/MegasharesCom.py') diff --git a/module/plugins/accounts/MegasharesCom.py b/module/plugins/accounts/MegasharesCom.py index bad3f5896..66db57814 100644 --- a/module/plugins/accounts/MegasharesCom.py +++ b/module/plugins/accounts/MegasharesCom.py @@ -31,6 +31,7 @@ class MegasharesCom(Account): timestr = re.search(self.VALID_UNTIL_PATTERN, html).group(1) self.log_debug(timestr) validuntil = time.mktime(time.strptime(timestr, "%b %d, %Y")) + except Exception, e: self.log_error(e) -- cgit v1.2.3 From fb45ec44220201268f99b747831df717fa7a83f8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 16:31:48 +0200 Subject: [Account] Fix __version__ --- module/plugins/accounts/MegasharesCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/MegasharesCom.py') diff --git a/module/plugins/accounts/MegasharesCom.py b/module/plugins/accounts/MegasharesCom.py index 66db57814..da8d6d62f 100644 --- a/module/plugins/accounts/MegasharesCom.py +++ b/module/plugins/accounts/MegasharesCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class MegasharesCom(Account): __name__ = "MegasharesCom" __type__ = "account" - __version__ = "0.05" + __version__ = "0.06" __status__ = "testing" __description__ = """Megashares.com account plugin""" -- cgit v1.2.3 From ec6e5dc7fcdcefee10e37d22473c9accae1104cf Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 29 Sep 2015 20:05:07 +0200 Subject: Account class completely rewritten + plugins updated --- module/plugins/accounts/MegasharesCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/MegasharesCom.py') diff --git a/module/plugins/accounts/MegasharesCom.py b/module/plugins/accounts/MegasharesCom.py index da8d6d62f..6967a7502 100644 --- a/module/plugins/accounts/MegasharesCom.py +++ b/module/plugins/accounts/MegasharesCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class MegasharesCom(Account): __name__ = "MegasharesCom" __type__ = "account" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __description__ = """Megashares.com account plugin""" @@ -20,7 +20,7 @@ class MegasharesCom(Account): VALID_UNTIL_PATTERN = r'

Period Ends: (\w{3} \d{1,2}, \d{4})

' - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): # self.relogin(user) html = self.load("http://d01.megashares.com/myms.php") @@ -38,7 +38,7 @@ class MegasharesCom(Account): return {'validuntil': validuntil, 'trafficleft': -1, 'premium': premium} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load('http://d01.megashares.com/myms_login.php', post={'httpref' : "", 'myms_login' : "Login", -- cgit v1.2.3