diff options
author | Guidobelix <guidobelix@hotmail.it> | 2014-09-16 17:02:29 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-09-16 17:02:29 +0200 |
commit | 8d2ce2b8c169b801c9e98d96cb2c2e6aa1c25f19 (patch) | |
tree | 16f1396313729ec28807bbf074702b956d1d8f3a /module/plugins/accounts | |
parent | [XFilesharingPro] Embedded urls support (diff) | |
download | pyload-8d2ce2b8c169b801c9e98d96cb2c2e6aa1c25f19.tar.xz |
Update EasybytezCom
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/EasybytezCom.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/module/plugins/accounts/EasybytezCom.py b/module/plugins/accounts/EasybytezCom.py index 105c365b5..564549521 100644 --- a/module/plugins/accounts/EasybytezCom.py +++ b/module/plugins/accounts/EasybytezCom.py @@ -11,7 +11,7 @@ from module.utils import parseFileSize class EasybytezCom(Account): __name__ = "EasybytezCom" __type__ = "account" - __version__ = "0.05" + __version__ = "0.06" __description__ = """EasyBytez.com account plugin""" __author_name__ = ("zoidberg", "guidobelix") @@ -24,24 +24,26 @@ class EasybytezCom(Account): def loadAccountInfo(self, user, req): html = req.load("http://www.easybytez.com/?op=my_account", decode=True) - validuntil = -1 + validuntil = None trafficleft = None premium = False m = re.search(self.VALID_UNTIL_PATTERN, html) if m: + expiredate = m.group(1) + self.logDebug("Expire date: " + expiredate) + try: - expiredate = m.group(1) - self.logDebug("Expire date: " + expiredate) validuntil = mktime(strptime(expiredate, "%d %B %Y")) except Exception, e: self.logError(e) + + if validuntil > mktime(gmtime()): + premium = True + trafficleft = -1 else: - if validuntil > mktime(gmtime()): - premium = True - trafficleft = -1 - else: - premium = False + premium = False + validuntil = -1 m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: |