From 3abd6df2b3df9cecdfd9aca298476e258b98a183 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 2 Jun 2015 12:37:59 +0200 Subject: [NitroflareCom] Premium support --- module/plugins/accounts/CatShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/CatShareNet.py') diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index bb42f443f..3ddadca8e 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -11,7 +11,7 @@ class CatShareNet(Account): __type__ = "account" __version__ = "0.05" - __description__ = """CatShareNet account plugin""" + __description__ = """Catshare.net account plugin""" __license__ = "GPLv3" __authors__ = [("prOq", None)] -- cgit v1.2.3 From 049298dbdbff33918454b03a3b072f418d47af97 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 6 Jun 2015 05:33:38 +0200 Subject: Use SSL when login account --- module/plugins/accounts/CatShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/CatShareNet.py') diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index 3ddadca8e..aa8be6854 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -50,7 +50,7 @@ class CatShareNet(Account): def login(self, user, data, req): - html = req.load("http://catshare.net/login", + html = req.load("https://catshare.net/login", post={'user_email': user, 'user_password': data['password'], 'remindPassword': 0, -- cgit v1.2.3 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/CatShareNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/CatShareNet.py') diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index aa8be6854..1d23e2b97 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -3,13 +3,13 @@ import re import time -from module.plugins.Account import Account +from module.plugins.internal.Account import Account class CatShareNet(Account): __name__ = "CatShareNet" __type__ = "account" - __version__ = "0.05" + __version__ = "0.06" __description__ = """Catshare.net account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 963d3011e3de5f8a5f2e53ddf75f3f9a9252ca42 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 9 Jun 2015 09:07:02 +0200 Subject: Fix https://github.com/pyload/pyload/issues/1471 --- module/plugins/accounts/CatShareNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/CatShareNet.py') diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index 1d23e2b97..ae2b69dfa 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class CatShareNet(Account): __name__ = "CatShareNet" __type__ = "account" - __version__ = "0.06" + __version__ = "0.07" __description__ = """Catshare.net account plugin""" __license__ = "GPLv3" @@ -50,7 +50,7 @@ class CatShareNet(Account): def login(self, user, data, req): - html = req.load("https://catshare.net/login", + html = req.load("http://catshare.net/login", #@TODO: Revert to `https` in 0.4.10 post={'user_email': user, 'user_password': data['password'], 'remindPassword': 0, -- 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/CatShareNet.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/CatShareNet.py') diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index ae2b69dfa..79e94cc17 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -26,7 +26,7 @@ class CatShareNet(Account): validuntil = -1 trafficleft = -1 - html = req.load("http://catshare.net/", decode=True) + html = self.load("http://catshare.net/", req=req) if re.search(self.PREMIUM_PATTERN, html): premium = True @@ -50,12 +50,11 @@ class CatShareNet(Account): def login(self, user, data, req): - html = req.load("http://catshare.net/login", #@TODO: Revert to `https` in 0.4.10 + html = self.load("http://catshare.net/login", #@TODO: Revert to `https` in 0.4.10 post={'user_email': user, 'user_password': data['password'], 'remindPassword': 0, - 'user[submit]': "Login"}, - decode=True) + 'user[submit]': "Login"}, req=req) if not 'Wyloguj' in 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/CatShareNet.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/accounts/CatShareNet.py') diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index 79e94cc17..8eb422962 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class CatShareNet(Account): __name__ = "CatShareNet" __type__ = "account" - __version__ = "0.07" + __version__ = "0.08" __description__ = """Catshare.net account plugin""" __license__ = "GPLv3" @@ -21,7 +21,7 @@ class CatShareNet(Account): TRAFFIC_LEFT_PATTERN = r'([0-9.]+ [kMG]B)' - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): premium = False validuntil = -1 trafficleft = -1 @@ -33,7 +33,7 @@ class CatShareNet(Account): try: expiredate = re.search(self.VALID_UNTIL_PATTERN, html).group(1) - self.logDebug("Expire date: " + expiredate) + self.log_debug("Expire date: " + expiredate) validuntil = time.mktime(time.strptime(expiredate, "%Y-%m-%d %H:%M:%S")) @@ -41,7 +41,7 @@ class CatShareNet(Account): pass try: - trafficleft = self.parseTraffic(re.search(self.TRAFFIC_LEFT_PATTERN, html).group(1)) + trafficleft = self.parse_traffic(re.search(self.TRAFFIC_LEFT_PATTERN, html).group(1)) except Exception: pass @@ -57,4 +57,4 @@ class CatShareNet(Account): 'user[submit]': "Login"}, req=req) if not 'Wyloguj' in 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/CatShareNet.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/CatShareNet.py') diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index 8eb422962..1a7355095 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -51,10 +51,11 @@ class CatShareNet(Account): def login(self, user, data, req): html = self.load("http://catshare.net/login", #@TODO: Revert to `https` in 0.4.10 - post={'user_email': user, - 'user_password': data['password'], - 'remindPassword': 0, - 'user[submit]': "Login"}, req=req) + post={'user_email' : user, + 'user_password' : data['password'], + 'remindPassword': 0, + 'user[submit]' : "Login"}, + req=req) if not 'Wyloguj' in 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/CatShareNet.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/CatShareNet.py') diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index 1a7355095..da0eec4f0 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -26,7 +26,7 @@ class CatShareNet(Account): validuntil = -1 trafficleft = -1 - html = self.load("http://catshare.net/", req=req) + html = self.load("http://catshare.net/") if re.search(self.PREMIUM_PATTERN, html): premium = True @@ -54,8 +54,7 @@ class CatShareNet(Account): post={'user_email' : user, 'user_password' : data['password'], 'remindPassword': 0, - 'user[submit]' : "Login"}, - req=req) + 'user[submit]' : "Login"}) if not 'Wyloguj' in 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/CatShareNet.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/CatShareNet.py') diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index da0eec4f0..87f21c7fa 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -10,6 +10,7 @@ class CatShareNet(Account): __name__ = "CatShareNet" __type__ = "account" __version__ = "0.08" + __status__ = "stable" __description__ = """Catshare.net 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/CatShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/CatShareNet.py') diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index 87f21c7fa..3cda27510 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -10,7 +10,7 @@ class CatShareNet(Account): __name__ = "CatShareNet" __type__ = "account" __version__ = "0.08" - __status__ = "stable" + __status__ = "testing" __description__ = """Catshare.net 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/CatShareNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/CatShareNet.py') diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index 3cda27510..f198561f5 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -22,7 +22,7 @@ class CatShareNet(Account): TRAFFIC_LEFT_PATTERN = r'([0-9.]+ [kMG]B)' - def load_account_info(self, user, req): + def parse_info(self, user, password, data, req): premium = False validuntil = -1 trafficleft = -1 @@ -50,12 +50,12 @@ class CatShareNet(Account): return {'premium': premium, 'trafficleft': trafficleft, 'validuntil': validuntil} - def login(self, user, data, req): + def login(self, user, password, data, req): html = self.load("http://catshare.net/login", #@TODO: Revert to `https` in 0.4.10 post={'user_email' : user, - 'user_password' : data['password'], + 'user_password' : password, 'remindPassword': 0, 'user[submit]' : "Login"}) if not 'Wyloguj' in 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/CatShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/CatShareNet.py') diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index f198561f5..92f1cb27e 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -58,4 +58,4 @@ class CatShareNet(Account): 'user[submit]' : "Login"}) if not 'Wyloguj' in html: - self.fail() + self.login_fail() -- cgit v1.2.3