diff options
author | Sahil Shekhawat <sahilshekhawat01@gmail.com> | 2015-01-11 14:54:48 +0100 |
---|---|---|
committer | Sahil Shekhawat <sahilshekhawat01@gmail.com> | 2015-01-11 14:54:48 +0100 |
commit | d2b60b5ceb369814a0de41c8b8744b5c4ed81523 (patch) | |
tree | 6619e01fc0e5f281e4d28678ec565860a86784ec /module/plugins/accounts/Keep2shareCc.py | |
parent | updated nitroflare.com's plugin (diff) | |
parent | Code improvements (diff) | |
download | pyload-d2b60b5ceb369814a0de41c8b8744b5c4ed81523.tar.xz |
Merged with the updated nitroflare
Diffstat (limited to 'module/plugins/accounts/Keep2shareCc.py')
-rw-r--r-- | module/plugins/accounts/Keep2shareCc.py | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/module/plugins/accounts/Keep2shareCc.py b/module/plugins/accounts/Keep2shareCc.py index fac3cc4a6..e855fb977 100644 --- a/module/plugins/accounts/Keep2shareCc.py +++ b/module/plugins/accounts/Keep2shareCc.py @@ -7,12 +7,12 @@ from time import gmtime, mktime, strptime from module.plugins.Account import Account -class Keep2shareCc(Account): - __name__ = "Keep2shareCc" +class Keep2ShareCc(Account): + __name__ = "Keep2ShareCc" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" - __description__ = """Keep2share.cc account plugin""" + __description__ = """Keep2Share.cc account plugin""" __license__ = "GPLv3" __authors__ = [("aeronaut", "aeronaut@pianoguy.de")] @@ -35,18 +35,22 @@ class Keep2shareCc(Account): expiredate = m.group(1).strip() self.logDebug("Expire date: " + expiredate) - try: - validuntil = mktime(strptime(expiredate, "%Y.%m.%d")) + if expiredate == "LifeTime": + premium = True + validuntil = -1 + else: + try: + validuntil = mktime(strptime(expiredate, "%Y.%m.%d")) - except Exception, e: - self.logError(e) + except Exception, e: + self.logError(e) - else: - if validuntil > mktime(gmtime()): - premium = True else: - premium = False - validuntil = None + if validuntil > mktime(gmtime()): + premium = True + else: + premium = False + validuntil = None m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: @@ -66,7 +70,8 @@ class Keep2shareCc(Account): post={'LoginForm[username]' : user, 'LoginForm[password]' : data['password'], 'LoginForm[rememberMe]': 1, - 'yt0' : ""}) + 'yt0' : ""}, + decode=True) if re.search(self.LOGIN_FAIL_PATTERN, html): self.wrongPassword() |