diff options
author | Stefano <l.stickell@yahoo.it> | 2013-07-23 20:22:42 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-07-23 20:22:42 +0200 |
commit | f5535809bebc6cc343475704832c8fd8674d2d06 (patch) | |
tree | c59bc1e6d71c04f5545ea262056c0c5be1bd8910 /module/plugins/accounts/YibaishiwuCom.py | |
parent | Fixed PEP 8 violations in Hosters (diff) | |
download | pyload-f5535809bebc6cc343475704832c8fd8674d2d06.tar.xz |
Fixed PEP 8 violations in Accounts
Diffstat (limited to 'module/plugins/accounts/YibaishiwuCom.py')
-rw-r--r-- | module/plugins/accounts/YibaishiwuCom.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index e2aa6f11d..c4eab74dc 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -17,9 +17,11 @@ @author: zoidberg """ -from module.plugins.Account import Account import re +from module.plugins.Account import Account + + class YibaishiwuCom(Account): __name__ = "YibaishiwuCom" __version__ = "0.01" @@ -32,20 +34,20 @@ class YibaishiwuCom(Account): def loadAccountInfo(self, user, req): #self.relogin(user) - html = req.load("http://115.com/", decode = True) - + html = req.load("http://115.com/", decode=True) + found = re.search(self.ACCOUNT_INFO_PATTERN, html, re.S) premium = True if (found and 'is_vip: 1' in found.group(1)) else False validuntil = trafficleft = (-1 if found else 0) return dict({"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}) def login(self, user, data, req): - html = req.load('http://passport.115.com/?ac=login', post = { + html = req.load('http://passport.115.com/?ac=login', post={ "back": "http://www.115.com/", "goto": "http://115.com/", "login[account]": user, "login[passwd]": data['password'] - }, decode = True) + }, decode=True) if not 'var USER_PERMISSION = {' in html: - self.wrongPassword()
\ No newline at end of file + self.wrongPassword() |