diff options
author | synweap15 <shamdog+github@gmail.com> | 2014-12-30 20:21:23 +0100 |
---|---|---|
committer | synweap15 <shamdog+github@gmail.com> | 2014-12-30 20:21:23 +0100 |
commit | ac9ba34bd5e629ddfbe67dec88ff2e0653e80356 (patch) | |
tree | f77bc281bd083145b19e82bf0e5ff34f5cd6f01a /module/plugins/accounts/Vipleech4uCom.py | |
parent | [Oboom] new hoster and account (diff) | |
parent | Update some MultiHoster __pattern__ (diff) | |
download | pyload-ac9ba34bd5e629ddfbe67dec88ff2e0653e80356.tar.xz |
Merge pull request #1 from pyload/stable
Merge
Diffstat (limited to 'module/plugins/accounts/Vipleech4uCom.py')
-rw-r--r-- | module/plugins/accounts/Vipleech4uCom.py | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/module/plugins/accounts/Vipleech4uCom.py b/module/plugins/accounts/Vipleech4uCom.py deleted file mode 100644 index 1e8463456..000000000 --- a/module/plugins/accounts/Vipleech4uCom.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- -import re -from time import mktime, strptime - -from module.plugins.Account import Account - - -class Vipleech4uCom(Account): - __name__ = "Vipleech4uCom" - __version__ = "0.1" - __type__ = "account" - __description__ = """Vipleech4u.com account plugin""" - __author_name__ = ("Kagenoshin") - __author_mail__ = ("kagenoshin@gmx.ch") - - STATUS_PATTERN = re.compile(r'status.*?<\s*?strong\s*?>[^<]*?vip[^<]*?<', re.I) - VALIDUNTIL_PATTERN = re.compile(r'valid\s*?until.*?<\s*?strong\s*?>([^<]*?)<', re.I) - - def loadAccountInfo(self, user, req): - response = req.load("http://vipleech4u.com", decode=True) - status = self.STATUS_PATTERN.search(response) - - validuntil = self.VALIDUNTIL_PATTERN.search(response) - if validuntil: - validuntil = validuntil.group(1) - - if status and validuntil: - print status - print validuntil - return {"trafficleft": -1, "validuntil": mktime(strptime("%s 23:59" % validuntil, "%d-%m-%Y %H:%M"))} - else: - return {"premium": False} - - def login(self, user, data, req): - self.loginname = user - self.password = data["password"] - post_data = {'action': 'login', 'user': self.loginname, 'pass': self.password} - req.load("http://vipleech4u.com/login.php") - response = req.load("http://vipleech4u.com/login.php", post=post_data, decode=True) - if 'Username or Password are incorrect' in response: - self.wrongPassword() |