From 0e1ef9bc01579328e17e79416fa3c1c7b77adcc8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 06:08:01 +0200 Subject: Update everything --- 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 b92a371a5..efeeaceb7 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -3,13 +3,13 @@ import re import time -from module.plugins.Account import Account +from module.plugins.internal.Account import Account class FilejungleCom(Account): __name__ = "FilejungleCom" __type__ = "account" - __version__ = "0.12" + __version__ = "0.13" __description__ = """Filejungle.com account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From c1764e2fea0bb05164c83a876e8cd58b97f58f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Jun 2015 17:31:38 +0200 Subject: Update all --- module/plugins/accounts/FilejungleCom.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/FilejungleCom.py') diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index efeeaceb7..459c70c95 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -24,7 +24,7 @@ class FilejungleCom(Account): def loadAccountInfo(self, user, req): - html = req.load(self.URL + "dashboard.php") + html = self.load(self.URL + "dashboard.php", req=req) m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: premium = True @@ -37,14 +37,13 @@ class FilejungleCom(Account): def login(self, user, data, req): - html = req.load(self.URL + "login.php", + html = self.load(self.URL + "login.php", post={"loginUserName": user, "loginUserPassword": data['password'], "loginFormSubmit": "Login", "recaptcha_challenge_field": "", "recaptcha_response_field": "", - "recaptcha_shortencode_field": ""}, - decode=True) + "recaptcha_shortencode_field": ""}, req=req) if re.search(self.LOGIN_FAILED_PATTERN, html): self.wrongPassword() -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- 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 459c70c95..5b4092681 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class FilejungleCom(Account): __name__ = "FilejungleCom" __type__ = "account" - __version__ = "0.13" + __version__ = "0.14" __description__ = """Filejungle.com account plugin""" __license__ = "GPLv3" @@ -23,7 +23,7 @@ class FilejungleCom(Account): LOGIN_FAILED_PATTERN = r'' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): html = self.load(self.URL + "dashboard.php", req=req) m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: @@ -46,4 +46,4 @@ class FilejungleCom(Account): "recaptcha_shortencode_field": ""}, req=req) if re.search(self.LOGIN_FAILED_PATTERN, html): - self.wrongPassword() + self.wrong_password() -- cgit v1.2.3 From d2e2b127651a5a44b56337eb6d9ca246c97a208a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Jul 2015 03:03:26 +0200 Subject: Spare fixes and code cosmetics --- module/plugins/accounts/FilejungleCom.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'module/plugins/accounts/FilejungleCom.py') diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index 5b4092681..f5ee5889a 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -2,6 +2,7 @@ import re import time +import urlparse from module.plugins.internal.Account import Account @@ -37,13 +38,14 @@ class FilejungleCom(Account): def login(self, user, data, req): - html = self.load(self.URL + "login.php", - post={"loginUserName": user, - "loginUserPassword": data['password'], - "loginFormSubmit": "Login", - "recaptcha_challenge_field": "", - "recaptcha_response_field": "", - "recaptcha_shortencode_field": ""}, req=req) + html = self.load(urlparse.urljoin(self.URL, "login.php"), + post={"loginUserName" : user, + "loginUserPassword" : data['password'], + "loginFormSubmit" : "Login", + "recaptcha_challenge_field" : "", + "recaptcha_response_field" : "", + "recaptcha_shortencode_field": ""}, + req=req) if re.search(self.LOGIN_FAILED_PATTERN, html): self.wrong_password() -- cgit v1.2.3 From 1f5a55ae2133a782bdcca334ecbcdbde50dbcf99 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Jul 2015 15:29:48 +0200 Subject: No more need to use the req argument when call load method --- module/plugins/accounts/FilejungleCom.py | 5 ++--- 1 file changed, 2 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 f5ee5889a..f0ff77ad8 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -25,7 +25,7 @@ class FilejungleCom(Account): def load_account_info(self, user, req): - html = self.load(self.URL + "dashboard.php", req=req) + html = self.load(self.URL + "dashboard.php") m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: premium = True @@ -44,8 +44,7 @@ class FilejungleCom(Account): "loginFormSubmit" : "Login", "recaptcha_challenge_field" : "", "recaptcha_response_field" : "", - "recaptcha_shortencode_field": ""}, - req=req) + "recaptcha_shortencode_field": ""}) if re.search(self.LOGIN_FAILED_PATTERN, html): self.wrong_password() -- cgit v1.2.3 From ff9383bfe06d14d23bc0ed6af79aa8967965d078 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 10:59:52 +0200 Subject: Code cosmetics (3) --- module/plugins/accounts/FilejungleCom.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'module/plugins/accounts/FilejungleCom.py') diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index f0ff77ad8..3909addd5 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -34,17 +34,17 @@ class FilejungleCom(Account): premium = False validuntil = -1 - return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} + return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil} def login(self, user, data, req): html = self.load(urlparse.urljoin(self.URL, "login.php"), - post={"loginUserName" : user, - "loginUserPassword" : data['password'], - "loginFormSubmit" : "Login", - "recaptcha_challenge_field" : "", - "recaptcha_response_field" : "", - "recaptcha_shortencode_field": ""}) + post={'loginUserName' : user, + 'loginUserPassword' : data['password'], + 'loginFormSubmit' : "Login", + 'recaptcha_challenge_field' : "", + 'recaptcha_response_field' : "", + 'recaptcha_shortencode_field': ""}) if re.search(self.LOGIN_FAILED_PATTERN, html): self.wrong_password() -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/accounts/FilejungleCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/FilejungleCom.py') diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index 3909addd5..c1aad9514 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -11,6 +11,7 @@ class FilejungleCom(Account): __name__ = "FilejungleCom" __type__ = "account" __version__ = "0.14" + __status__ = "stable" __description__ = """Filejungle.com account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- 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 c1aad9514..69fb37a65 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -11,7 +11,7 @@ class FilejungleCom(Account): __name__ = "FilejungleCom" __type__ = "account" __version__ = "0.14" - __status__ = "stable" + __status__ = "testing" __description__ = """Filejungle.com account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 8f17f875f6e28f73ddb10da59c6464bd04922222 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Jul 2015 04:59:27 +0200 Subject: Account rewritten --- module/plugins/accounts/FilejungleCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/FilejungleCom.py') diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index 69fb37a65..5c91c3822 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 load_account_info(self, user, req): + def parse_info(self, user, password, data, req): html = self.load(self.URL + "dashboard.php") m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: @@ -38,14 +38,14 @@ class FilejungleCom(Account): return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil} - def login(self, user, data, req): + def login(self, user, password, data, req): html = self.load(urlparse.urljoin(self.URL, "login.php"), post={'loginUserName' : user, - 'loginUserPassword' : data['password'], + 'loginUserPassword' : password, 'loginFormSubmit' : "Login", 'recaptcha_challenge_field' : "", 'recaptcha_response_field' : "", 'recaptcha_shortencode_field': ""}) if re.search(self.LOGIN_FAILED_PATTERN, html): - self.wrong_password() + self.fail() -- cgit v1.2.3 From a95c217627a1cb651b24e69f20640df40797aff9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Jul 2015 09:34:18 +0200 Subject: Account rewritten (2) --- 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 5c91c3822..fb251ac5f 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -48,4 +48,4 @@ class FilejungleCom(Account): 'recaptcha_shortencode_field': ""}) if re.search(self.LOGIN_FAILED_PATTERN, html): - self.fail() + self.login_fail() -- cgit v1.2.3