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/YibaishiwuCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/YibaishiwuCom.py') diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index 33602a2fe..d825ef1e1 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -29,7 +29,7 @@ class YibaishiwuCom(Account): def login(self, user, data, req): - html = req.load("http://passport.115.com/?ac=login", + html = req.load("https://passport.115.com/?ac=login", post={"back": "http://www.115.com/", "goto": "http://115.com/", "login[account]": user, -- 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/YibaishiwuCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/YibaishiwuCom.py') diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index d825ef1e1..2f1c990ec 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.Account import Account +from module.plugins.internal.Account import Account class YibaishiwuCom(Account): __name__ = "YibaishiwuCom" __type__ = "account" - __version__ = "0.02" + __version__ = "0.03" __description__ = """115.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/YibaishiwuCom.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/YibaishiwuCom.py') diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index 2f1c990ec..9d1d1d38f 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -20,7 +20,7 @@ class YibaishiwuCom(Account): def loadAccountInfo(self, user, req): #self.relogin(user) - html = req.load("http://115.com/", decode=True) + html = self.load("http://115.com/", req=req) m = re.search(self.ACCOUNT_INFO_PATTERN, html, re.S) premium = True if m and 'is_vip: 1' in m.group(1) else False @@ -29,12 +29,11 @@ class YibaishiwuCom(Account): def login(self, user, data, req): - html = req.load("https://passport.115.com/?ac=login", + html = self.load("https://passport.115.com/?ac=login", post={"back": "http://www.115.com/", "goto": "http://115.com/", "login[account]": user, - "login[passwd]": data['password']}, - decode=True) + "login[passwd]": data['password']}, req=req) if not 'var USER_PERMISSION = {' 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/YibaishiwuCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/YibaishiwuCom.py') diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index 9d1d1d38f..fad22b4c6 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.Account import Account class YibaishiwuCom(Account): __name__ = "YibaishiwuCom" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" __description__ = """115.com account plugin""" __license__ = "GPLv3" @@ -18,8 +18,8 @@ class YibaishiwuCom(Account): ACCOUNT_INFO_PATTERN = r'var USER_PERMISSION = {(.*?)}' - def loadAccountInfo(self, user, req): - #self.relogin(user) + def load_account_info(self, user, req): + # self.relogin(user) html = self.load("http://115.com/", req=req) m = re.search(self.ACCOUNT_INFO_PATTERN, html, re.S) @@ -36,4 +36,4 @@ class YibaishiwuCom(Account): "login[passwd]": data['password']}, req=req) if not 'var USER_PERMISSION = {' 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/YibaishiwuCom.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/YibaishiwuCom.py') diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index fad22b4c6..dd4e33739 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -30,10 +30,11 @@ class YibaishiwuCom(Account): def login(self, user, data, req): html = self.load("https://passport.115.com/?ac=login", - post={"back": "http://www.115.com/", - "goto": "http://115.com/", - "login[account]": user, - "login[passwd]": data['password']}, req=req) + post={"back" : "http://www.115.com/", + "goto" : "http://115.com/", + "login[account]": user, + "login[passwd]" : data['password']}, + req=req) if not 'var USER_PERMISSION = {' 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/YibaishiwuCom.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/YibaishiwuCom.py') diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index dd4e33739..c2966f156 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -20,7 +20,7 @@ class YibaishiwuCom(Account): def load_account_info(self, user, req): # self.relogin(user) - html = self.load("http://115.com/", req=req) + html = self.load("http://115.com/") m = re.search(self.ACCOUNT_INFO_PATTERN, html, re.S) premium = True if m and 'is_vip: 1' in m.group(1) else False @@ -33,8 +33,7 @@ class YibaishiwuCom(Account): post={"back" : "http://www.115.com/", "goto" : "http://115.com/", "login[account]": user, - "login[passwd]" : data['password']}, - req=req) + "login[passwd]" : data['password']}) if not 'var USER_PERMISSION = {' in 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/YibaishiwuCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/YibaishiwuCom.py') diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index c2966f156..00cd91305 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -25,13 +25,13 @@ class YibaishiwuCom(Account): m = re.search(self.ACCOUNT_INFO_PATTERN, html, re.S) premium = True if m and 'is_vip: 1' in m.group(1) else False validuntil = trafficleft = (-1 if m else 0) - return dict({"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}) + return dict({'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium}) def login(self, user, data, req): html = self.load("https://passport.115.com/?ac=login", - post={"back" : "http://www.115.com/", - "goto" : "http://115.com/", + post={'back' : "http://www.115.com/", + 'goto' : "http://115.com/", "login[account]": user, "login[passwd]" : data['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/YibaishiwuCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/YibaishiwuCom.py') diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index 00cd91305..edfeca6ec 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -9,6 +9,7 @@ class YibaishiwuCom(Account): __name__ = "YibaishiwuCom" __type__ = "account" __version__ = "0.04" + __status__ = "stable" __description__ = """115.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/YibaishiwuCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/YibaishiwuCom.py') diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index edfeca6ec..78e67d4ea 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -9,7 +9,7 @@ class YibaishiwuCom(Account): __name__ = "YibaishiwuCom" __type__ = "account" __version__ = "0.04" - __status__ = "stable" + __status__ = "testing" __description__ = """115.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/YibaishiwuCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/YibaishiwuCom.py') diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index 78e67d4ea..a1886c945 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -19,7 +19,7 @@ class YibaishiwuCom(Account): ACCOUNT_INFO_PATTERN = r'var USER_PERMISSION = {(.*?)}' - def load_account_info(self, user, req): + def parse_info(self, user, password, data, req): # self.relogin(user) html = self.load("http://115.com/") @@ -29,12 +29,12 @@ class YibaishiwuCom(Account): return dict({'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium}) - def login(self, user, data, req): + def login(self, user, password, data, req): html = self.load("https://passport.115.com/?ac=login", post={'back' : "http://www.115.com/", 'goto' : "http://115.com/", "login[account]": user, - "login[passwd]" : data['password']}) + "login[passwd]" : password}) if not 'var USER_PERMISSION = {' 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/YibaishiwuCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/YibaishiwuCom.py') diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index a1886c945..c5dda0921 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -37,4 +37,4 @@ class YibaishiwuCom(Account): "login[passwd]" : password}) if not 'var USER_PERMISSION = {' in html: - self.fail() + self.login_fail() -- cgit v1.2.3