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/FilejungleCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/FilejungleCom.py') diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index fb251ac5f..ba9f8d248 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -25,7 +25,7 @@ class FilejungleCom(Account): LOGIN_FAILED_PATTERN = r'' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load(self.URL + "dashboard.php") m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: @@ -48,4 +48,4 @@ class FilejungleCom(Account): 'recaptcha_shortencode_field': ""}) if re.search(self.LOGIN_FAILED_PATTERN, html): - self.login_fail() + self.fail_login() -- 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/FilejungleCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/FilejungleCom.py') diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index ba9f8d248..a2ab676ee 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.Account import Account class FilejungleCom(Account): __name__ = "FilejungleCom" __type__ = "account" - __version__ = "0.14" + __version__ = "0.15" __status__ = "testing" __description__ = """Filejungle.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/FilejungleCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/FilejungleCom.py') diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index a2ab676ee..a7a1c3f56 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.Account import Account class FilejungleCom(Account): __name__ = "FilejungleCom" __type__ = "account" - __version__ = "0.15" + __version__ = "0.16" __status__ = "testing" __description__ = """Filejungle.com account plugin""" @@ -25,7 +25,7 @@ class FilejungleCom(Account): LOGIN_FAILED_PATTERN = r'' - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): html = self.load(self.URL + "dashboard.php") m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: @@ -38,7 +38,7 @@ class FilejungleCom(Account): return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load(urlparse.urljoin(self.URL, "login.php"), post={'loginUserName' : user, 'loginUserPassword' : password, -- cgit v1.2.3 From 25d5726d4953b93a2e286fd6af8d4ead20670ba6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 1 Oct 2015 04:55:17 +0200 Subject: A lot of plugin code cosmetics --- module/plugins/accounts/FilejungleCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/FilejungleCom.py') diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index a7a1c3f56..230aa9939 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -28,7 +28,7 @@ class FilejungleCom(Account): def grab_info(self, user, password, data): html = self.load(self.URL + "dashboard.php") m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - if m: + if m is not None: premium = True validuntil = time.mktime(time.strptime(m.group(1), "%d %b %Y")) else: -- cgit v1.2.3