summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/account/YibaishiwuCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 10:46:28 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 10:46:28 +0100
commitce1c2b6b05c08b669357947e61ae40efce7fc50f (patch)
tree0b5f7996960cf35c4eface53a89eba18a37519b7 /pyload/plugin/account/YibaishiwuCom.py
parentFix filename case (diff)
downloadpyload-ce1c2b6b05c08b669357947e61ae40efce7fc50f.tar.xz
module temp
Diffstat (limited to 'pyload/plugin/account/YibaishiwuCom.py')
-rw-r--r--pyload/plugin/account/YibaishiwuCom.py40
1 files changed, 0 insertions, 40 deletions
diff --git a/pyload/plugin/account/YibaishiwuCom.py b/pyload/plugin/account/YibaishiwuCom.py
deleted file mode 100644
index e169a5901..000000000
--- a/pyload/plugin/account/YibaishiwuCom.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from pyload.plugin.Account import Account
-
-
-class YibaishiwuCom(Account):
- __name__ = "YibaishiwuCom"
- __type__ = "account"
- __version__ = "0.01"
-
- __description__ = """115.com account plugin"""
- __license__ = "GPLv3"
- __authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
-
-
- ACCOUNT_INFO_PATTERN = r'var USER_PERMISSION = {(.*?)}'
-
-
- def loadAccountInfo(self, user, req):
- #self.relogin(user)
- html = req.load("http://115.com/", decode=True)
-
- 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})
-
-
- def login(self, user, data, req):
- 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)
-
- if not 'var USER_PERMISSION = {' in html:
- self.wrongPassword()