summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/accounts/YibaishiwuCom.py
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-07-23 20:22:42 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-07-23 20:40:59 +0200
commit4a81799278ae003bfbd7897f7bcd1ef46642d953 (patch)
tree59e580fc761103cfacd9190bc9c55a5a01367f47 /pyload/plugins/accounts/YibaishiwuCom.py
parentlittle cleanup, added some tests (diff)
downloadpyload-4a81799278ae003bfbd7897f7bcd1ef46642d953.tar.xz
Fixed PEP 8 violations in Accounts
(cherry picked from commit f5535809bebc6cc343475704832c8fd8674d2d06) Conflicts: pyload/plugins/accounts/AlldebridCom.py pyload/plugins/accounts/Premium4Me.py pyload/plugins/accounts/PremiumizeMe.py pyload/plugins/accounts/RealdebridCom.py
Diffstat (limited to 'pyload/plugins/accounts/YibaishiwuCom.py')
-rw-r--r--pyload/plugins/accounts/YibaishiwuCom.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/pyload/plugins/accounts/YibaishiwuCom.py b/pyload/plugins/accounts/YibaishiwuCom.py
index e2aa6f11d..c4eab74dc 100644
--- a/pyload/plugins/accounts/YibaishiwuCom.py
+++ b/pyload/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()