diff options
Diffstat (limited to 'pyload/plugins/accounts')
-rw-r--r-- | pyload/plugins/accounts/DebridItaliaCom.py | 2 | ||||
-rw-r--r-- | pyload/plugins/accounts/EasybytezCom.py | 36 | ||||
-rw-r--r-- | pyload/plugins/accounts/EgoFilesCom.py | 2 | ||||
-rw-r--r-- | pyload/plugins/accounts/FilerNet.py | 2 | ||||
-rw-r--r-- | pyload/plugins/accounts/FreeWayMe.py | 2 | ||||
-rw-r--r-- | pyload/plugins/accounts/HellshareCz.py | 8 | ||||
-rw-r--r-- | pyload/plugins/accounts/LetitbitNet.py | 4 | ||||
-rw-r--r-- | pyload/plugins/accounts/MyfastfileCom.py | 4 | ||||
-rw-r--r-- | pyload/plugins/accounts/RealdebridCom.py | 2 |
9 files changed, 35 insertions, 27 deletions
diff --git a/pyload/plugins/accounts/DebridItaliaCom.py b/pyload/plugins/accounts/DebridItaliaCom.py index cff0be018..34eb51ea6 100644 --- a/pyload/plugins/accounts/DebridItaliaCom.py +++ b/pyload/plugins/accounts/DebridItaliaCom.py @@ -27,7 +27,7 @@ class DebridItaliaCom(Account): validuntil = int(time.mktime(time.strptime(m.group('D'), "%d/%m/%Y %H:%M"))) return {"premium": True, "validuntil": validuntil, "trafficleft": -1} else: - self.logError('Unable to retrieve account information - Plugin may be out of date') + self.logError("Unable to retrieve account information - Plugin may be out of date") def login(self, user, data, req): self.html = req.load("http://debriditalia.com/login.php", diff --git a/pyload/plugins/accounts/EasybytezCom.py b/pyload/plugins/accounts/EasybytezCom.py index 595e95ec4..ef5b44e46 100644 --- a/pyload/plugins/accounts/EasybytezCom.py +++ b/pyload/plugins/accounts/EasybytezCom.py @@ -11,11 +11,11 @@ from pyload.utils import parseFileSize class EasybytezCom(Account): __name__ = "EasybytezCom" __type__ = "account" - __version__ = "0.04" + __version__ = "0.06" __description__ = """EasyBytez.com account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" + __author_name__ = ("zoidberg", "guidobelix") + __author_mail__ = ("zoidberg@mujmail.cz", "guidobelix@hotmail.it") VALID_UNTIL_PATTERN = r'Premium account expire:</TD><TD><b>([^<]+)</b>' TRAFFIC_LEFT_PATTERN = r'<TR><TD>Traffic available today:</TD><TD><b>(?P<S>[^<]+)</b>' @@ -24,30 +24,38 @@ class EasybytezCom(Account): def loadAccountInfo(self, user, req): html = req.load("http://www.easybytez.com/?op=my_account", decode=True) - validuntil = trafficleft = None + 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: - self.logDebug("Expire date: " + m.group(1)) - validuntil = mktime(strptime(m.group(1), "%d %B %Y")) + validuntil = mktime(strptime(expiredate, "%d %B %Y")) except Exception, e: self.logError(e) + if validuntil > mktime(gmtime()): premium = True trafficleft = -1 - else: - m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - if m: - trafficleft = m.group(1) - if "Unlimited" in trafficleft: - trafficleft = -1 - else: - trafficleft = parseFileSize(trafficleft) / 1024 + else: + premium = False + validuntil = -1 + + m = re.search(self.TRAFFIC_LEFT_PATTERN, html) + if m: + trafficleft = m.group(1) + if "Unlimited" in trafficleft: + trafficleft = -1 + else: + trafficleft = parseFileSize(trafficleft) / 1024 return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium} + def login(self, user, data, req): html = req.load('http://www.easybytez.com/login.html', decode=True) action, inputs = parseHtmlForm('name="FL"', html) diff --git a/pyload/plugins/accounts/EgoFilesCom.py b/pyload/plugins/accounts/EgoFilesCom.py index 3886d053a..620817a45 100644 --- a/pyload/plugins/accounts/EgoFilesCom.py +++ b/pyload/plugins/accounts/EgoFilesCom.py @@ -30,7 +30,7 @@ class EgoFilesCom(Account): trafficleft = parseFileSize(m.group('T'), m.group('U')) / 1024 return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} else: - self.logError('Unable to retrieve account information - Plugin may be out of date') + self.logError("Unable to retrieve account information - Plugin may be out of date") def login(self, user, data, req): # Set English language diff --git a/pyload/plugins/accounts/FilerNet.py b/pyload/plugins/accounts/FilerNet.py index 51c2e5d75..cc2e3fd6d 100644 --- a/pyload/plugins/accounts/FilerNet.py +++ b/pyload/plugins/accounts/FilerNet.py @@ -36,7 +36,7 @@ class FilerNet(Account): trafficleft = parseFileSize(traffic.group(1)) / 1024 return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} else: - self.logError('Unable to retrieve account information - Plugin may be out of date') + self.logError("Unable to retrieve account information - Plugin may be out of date") return {"premium": False, "validuntil": None, "trafficleft": None} def login(self, user, data, req): diff --git a/pyload/plugins/accounts/FreeWayMe.py b/pyload/plugins/accounts/FreeWayMe.py index 5106067a9..92f99972a 100644 --- a/pyload/plugins/accounts/FreeWayMe.py +++ b/pyload/plugins/accounts/FreeWayMe.py @@ -45,7 +45,7 @@ class FreeWayMe(Account): def getAccountStatus(self, user, req): answer = req.load("https://www.free-way.me/ajax/jd.php", get={"id": 4, "user": user, "pass": self.accounts[user]['password']}) - self.logDebug("login: %s" % answer) + self.logDebug("Login: %s" % answer) if answer == "Invalid login": self.wrongPassword() return False diff --git a/pyload/plugins/accounts/HellshareCz.py b/pyload/plugins/accounts/HellshareCz.py index ae3f974a1..34e4234f7 100644 --- a/pyload/plugins/accounts/HellshareCz.py +++ b/pyload/plugins/accounts/HellshareCz.py @@ -43,7 +43,7 @@ class HellshareCz(Account): trafficleft = int(credit) * 1024 validuntil = -1 except Exception, e: - self.logError('Unable to parse credit info', e) + self.logError("Unable to parse credit info", e) validuntil = -1 trafficleft = -1 @@ -53,14 +53,14 @@ class HellshareCz(Account): html = req.load('http://www.hellshare.com/') if req.lastEffectiveURL != 'http://www.hellshare.com/': #Switch to English - self.logDebug('Switch lang - URL: %s' % req.lastEffectiveURL) + self.logDebug("Switch lang - URL: %s" % req.lastEffectiveURL) json = req.load("%s?do=locRouter-show" % req.lastEffectiveURL) hash = re.search(r"(--[0-9a-f]+-)", json).group(1) - self.logDebug('Switch lang - HASH: %s' % hash) + self.logDebug("Switch lang - HASH: %s" % hash) html = req.load('http://www.hellshare.com/%s/' % hash) if re.search(self.CREDIT_LEFT_PATTERN, html): - self.logDebug('Already logged in') + self.logDebug("Already logged in") return html = req.load('http://www.hellshare.com/login?do=loginForm-submit', post={ diff --git a/pyload/plugins/accounts/LetitbitNet.py b/pyload/plugins/accounts/LetitbitNet.py index bce97d378..93d12a975 100644 --- a/pyload/plugins/accounts/LetitbitNet.py +++ b/pyload/plugins/accounts/LetitbitNet.py @@ -19,7 +19,7 @@ class LetitbitNet(Account): # api_key = self.accounts[user]['password'] # json_data = [api_key, ['key/info']] # api_rep = req.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)}) - # self.logDebug('API Key Info: ' + api_rep) + # self.logDebug("API Key Info: " + api_rep) # api_rep = json_loads(api_rep) # # if api_rep['status'] == 'FAIL': @@ -30,4 +30,4 @@ class LetitbitNet(Account): def login(self, user, data, req): # API_KEY is the username and the PREMIUM_KEY is the password - self.logInfo('You must use your API KEY as username and the PREMIUM KEY as password.') + self.logInfo("You must use your API KEY as username and the PREMIUM KEY as password.") diff --git a/pyload/plugins/accounts/MyfastfileCom.py b/pyload/plugins/accounts/MyfastfileCom.py index b5d35d326..2ec0ebb6d 100644 --- a/pyload/plugins/accounts/MyfastfileCom.py +++ b/pyload/plugins/accounts/MyfastfileCom.py @@ -21,13 +21,13 @@ class MyfastfileCom(Account): validuntil = int(time() + self.json_data['days_left'] * 24 * 60 * 60) return {"premium": True, "validuntil": validuntil, "trafficleft": -1} else: - self.logError('Unable to get account information') + self.logError("Unable to get account information") def login(self, user, data, req): # Password to use is the API-Password written in http://myfastfile.com/myaccount html = req.load("http://myfastfile.com/api.php", get={"user": user, "pass": data['password']}) - self.logDebug('JSON data: ' + html) + self.logDebug("JSON data: " + html) self.json_data = json_loads(html) if self.json_data['status'] != 'ok': self.logError('Invalid login. The password to use is the API-Password you find in your "My Account" page') diff --git a/pyload/plugins/accounts/RealdebridCom.py b/pyload/plugins/accounts/RealdebridCom.py index 8ab0234a9..1d76bb130 100644 --- a/pyload/plugins/accounts/RealdebridCom.py +++ b/pyload/plugins/accounts/RealdebridCom.py @@ -31,5 +31,5 @@ class RealdebridCom(Account): if "Your login informations are incorrect" in page: self.wrongPassword() elif "PIN Code required" in page: - self.logWarning('PIN code required. Please login to https://real-debrid.com using the PIN or disable the double authentication in your control panel on https://real-debrid.com.') + self.logWarning("PIN code required. Please login to https://real-debrid.com using the PIN or disable the double authentication in your control panel on https://real-debrid.com.") self.pin_code = True |