diff options
Diffstat (limited to 'module/plugins/accounts')
35 files changed, 126 insertions, 126 deletions
diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index c47ec9d77..61ba4f0b0 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -17,19 +17,19 @@ class BitshareCom(Account): html = self.load("http://bitshare.com/mysettings.html") if "\"http://bitshare.com/myupgrade.html\">Free" in html: - return {"validuntil": -1, "trafficleft": -1, "premium": False} + return {'validuntil': -1, 'trafficleft': -1, 'premium': False} if not '<input type="checkbox" name="directdownload" checked="checked" />' in html: self.log_warning(_("Activate direct Download in your Bitshare Account")) - return {"validuntil": -1, "trafficleft": -1, "premium": True} + return {'validuntil': -1, 'trafficleft': -1, 'premium': True} def login(self, user, data, req): html = self.load("https://bitshare.com/login.html", - post={"user" : user, - "password": data['password'], - "submit" : "Login"}) + post={'user' : user, + 'password': data['password'], + 'submit' : "Login"}) if "login" in req.lastEffectiveURL: self.wrong_password() diff --git a/module/plugins/accounts/CzshareCom.py b/module/plugins/accounts/CzshareCom.py index 4b1bb14cb..bce984d67 100644 --- a/module/plugins/accounts/CzshareCom.py +++ b/module/plugins/accounts/CzshareCom.py @@ -45,7 +45,7 @@ class CzshareCom(Account): def login(self, user, data, req): html = self.load('https://sdilej.cz/index.php', - post={"Prihlasit" : "Prihlasit", + post={'Prihlasit' : "Prihlasit", "login-password": data['password'], "login-name" : user}) diff --git a/module/plugins/accounts/DebridItaliaCom.py b/module/plugins/accounts/DebridItaliaCom.py index 4b4b498b7..07d7a2332 100644 --- a/module/plugins/accounts/DebridItaliaCom.py +++ b/module/plugins/accounts/DebridItaliaCom.py @@ -21,14 +21,14 @@ class DebridItaliaCom(Account): def load_account_info(self, user, req): - info = {"premium": False, "validuntil": None, "trafficleft": None} + info = {'premium': False, 'validuntil': None, 'trafficleft': None} html = self.load("http://debriditalia.com/") if 'Account premium not activated' not in html: m = re.search(self.WALID_UNTIL_PATTERN, html) if m: validuntil = time.mktime(time.strptime(m.group(1), "%d/%m/%Y %H:%M")) - info = {"premium": True, "validuntil": validuntil, "trafficleft": -1} + info = {'premium': True, 'validuntil': validuntil, 'trafficleft': -1} else: self.log_error(_("Unable to retrieve account information")) diff --git a/module/plugins/accounts/DepositfilesCom.py b/module/plugins/accounts/DepositfilesCom.py index 7c60682c0..8340a26d3 100644 --- a/module/plugins/accounts/DepositfilesCom.py +++ b/module/plugins/accounts/DepositfilesCom.py @@ -24,14 +24,14 @@ class DepositfilesCom(Account): validuntil = time.mktime(time.strptime(validuntil, "%Y-%m-%d %H:%M:%S")) - return {"validuntil": validuntil, "trafficleft": -1} + return {'validuntil': validuntil, 'trafficleft': -1} def login(self, user, data, req): html = self.load("https://dfiles.eu/de/login.php", - get={"return": "/de/gold/payment.php"}, - post={"login" : user, - "password": data['password']}) + get={'return': "/de/gold/payment.php"}, + post={'login' : user, + 'password': data['password']}) if r'<div class="error_message">Sie haben eine falsche Benutzername-Passwort-Kombination verwendet.</div>' in html: self.wrong_password() diff --git a/module/plugins/accounts/EuroshareEu.py b/module/plugins/accounts/EuroshareEu.py index 6317ea1b2..f39577fbd 100644 --- a/module/plugins/accounts/EuroshareEu.py +++ b/module/plugins/accounts/EuroshareEu.py @@ -28,14 +28,14 @@ class EuroshareEu(Account): premium = True validuntil = time.mktime(time.strptime(m.group(1), "%d.%m.%Y %H:%M")) - return {"validuntil": validuntil, "trafficleft": -1, "premium": premium} + return {'validuntil': validuntil, 'trafficleft': -1, 'premium': premium} def login(self, user, data, req): html = self.load('http://euroshare.eu/customer-zone/login/', - post={"trvale" : "1", - "login" : user, - "password": data['password']}) + post={'trvale' : "1", + 'login' : user, + 'password': data['password']}) if u">Nesprávne prihlasovacie meno alebo heslo" in html: self.wrong_password() diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py index 1fe93fb14..789fa9e04 100644 --- a/module/plugins/accounts/FastixRu.py +++ b/module/plugins/accounts/FastixRu.py @@ -24,9 +24,9 @@ class FastixRu(Account): kb = float(points) * 1024 ** 2 / 1000 if points > 0: - account_info = {"validuntil": -1, "trafficleft": kb} + account_info = {'validuntil': -1, 'trafficleft': kb} else: - account_info = {"validuntil": None, "trafficleft": None, "premium": False} + account_info = {'validuntil': None, 'trafficleft': None, 'premium': False} return account_info diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py index d8b60ccbc..5e31988b7 100644 --- a/module/plugins/accounts/FilecloudIo.py +++ b/module/plugins/accounts/FilecloudIo.py @@ -19,26 +19,26 @@ class FilecloudIo(Account): #: It looks like the first API request always fails, so we retry 5 times, it should work on the second try for _i in xrange(5): rep = self.load("https://secure.filecloud.io/api-fetch_apikey.api", - post={"username": user, "password": self.get_account_data(user)['password']}) + post={'username': user, 'password': self.get_account_data(user)['password']}) rep = json_loads(rep) if rep['status'] == 'ok': break elif rep['status'] == 'error' and rep['message'] == 'no such user or wrong password': self.log_error(_("Wrong username or password")) - return {"valid": False, "premium": False} + return {'valid': False, 'premium': False} else: - return {"premium": False} + return {'premium': False} akey = rep['akey'] self.accounts[user]['akey'] = akey #: Saved for hoster plugin rep = self.load("http://api.filecloud.io/api-fetch_account_details.api", - post={"akey": akey}) + post={'akey': akey}) rep = json_loads(rep) if rep['is_premium'] == 1: - return {"validuntil": float(rep['premium_until']), "trafficleft": -1} + return {'validuntil': float(rep['premium_until']), 'trafficleft': -1} else: - return {"premium": False} + return {'premium': False} def login(self, user, data, req): diff --git a/module/plugins/accounts/FilefactoryCom.py b/module/plugins/accounts/FilefactoryCom.py index e402c8aaa..eee356bf1 100644 --- a/module/plugins/accounts/FilefactoryCom.py +++ b/module/plugins/accounts/FilefactoryCom.py @@ -33,16 +33,16 @@ class FilefactoryCom(Account): premium = False validuntil = -1 - return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} + return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil} def login(self, user, data, req): req.http.c.setopt(pycurl.REFERER, "http://www.filefactory.com/member/login.php") html = self.load("https://www.filefactory.com/member/signin.php", - post={"loginEmail" : user, - "loginPassword": data['password'], - "Submit" : "Sign In"}) + post={'loginEmail' : user, + 'loginPassword': data['password'], + 'Submit' : "Sign In"}) if req.lastEffectiveURL != "http://www.filefactory.com/account/": self.wrong_password() diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index f0ff77ad8..3909addd5 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -34,17 +34,17 @@ class FilejungleCom(Account): premium = False validuntil = -1 - return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} + return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil} def login(self, user, data, req): html = self.load(urlparse.urljoin(self.URL, "login.php"), - post={"loginUserName" : user, - "loginUserPassword" : data['password'], - "loginFormSubmit" : "Login", - "recaptcha_challenge_field" : "", - "recaptcha_response_field" : "", - "recaptcha_shortencode_field": ""}) + post={'loginUserName' : user, + 'loginUserPassword' : data['password'], + 'loginFormSubmit' : "Login", + 'recaptcha_challenge_field' : "", + 'recaptcha_response_field' : "", + 'recaptcha_shortencode_field': ""}) if re.search(self.LOGIN_FAILED_PATTERN, html): self.wrong_password() diff --git a/module/plugins/accounts/FilerNet.py b/module/plugins/accounts/FilerNet.py index ac90c2993..807c938f4 100644 --- a/module/plugins/accounts/FilerNet.py +++ b/module/plugins/accounts/FilerNet.py @@ -27,7 +27,7 @@ class FilerNet(Account): #: Free user if re.search(self.FREE_PATTERN, html): - return {"premium": False, "validuntil": None, "trafficleft": None} + return {'premium': False, 'validuntil': None, 'trafficleft': None} until = re.search(self.WALID_UNTIL_PATTERN, html) traffic = re.search(self.TRAFFIC_PATTERN, html) @@ -35,11 +35,11 @@ class FilerNet(Account): if until and traffic: validuntil = time.mktime(time.strptime(until.group(1), "%d.%m.%Y %H:%M:%S")) trafficleft = self.parse_traffic(traffic.group(1)) - return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} + return {'premium': True, 'validuntil': validuntil, 'trafficleft': trafficleft} else: self.log_error(_("Unable to retrieve account information")) - return {"premium": False, "validuntil": None, "trafficleft": None} + return {'premium': False, 'validuntil': None, 'trafficleft': None} def login(self, user, data, req): @@ -48,11 +48,11 @@ class FilerNet(Account): token = re.search(self.TOKEN_PATTERN, html).group(1) html = self.load("https://filer.net/login_check", - post={"_username" : user, - "_password" : data['password'], - "_remember_me": "on", - "_csrf_token" : token, - "_target_path": "https://filer.net/"}) + post={'_username' : user, + '_password' : data['password'], + '_remember_me': "on", + '_csrf_token' : token, + '_target_path': "https://filer.net/"}) if 'Logout' not in html: self.wrong_password() diff --git a/module/plugins/accounts/FilesMailRu.py b/module/plugins/accounts/FilesMailRu.py index b1ec45c42..8335b92e3 100644 --- a/module/plugins/accounts/FilesMailRu.py +++ b/module/plugins/accounts/FilesMailRu.py @@ -14,17 +14,17 @@ class FilesMailRu(Account): def load_account_info(self, user, req): - return {"validuntil": None, "trafficleft": None} + return {'validuntil': None, 'trafficleft': None} def login(self, user, data, req): user, domain = user.split("@") html = self.load("https://swa.mail.ru/cgi-bin/auth", - post={"Domain" : domain, - "Login" : user, - "Password": data['password'], - "Page" : "http://files.mail.ru/"}) + post={'Domain' : domain, + 'Login' : user, + 'Password': data['password'], + 'Page' : "http://files.mail.ru/"}) if "Неверное имя пользователя или пароль" in html: self.wrong_password() diff --git a/module/plugins/accounts/FileserveCom.py b/module/plugins/accounts/FileserveCom.py index edbf4a1cf..8a77325d4 100644 --- a/module/plugins/accounts/FileserveCom.py +++ b/module/plugins/accounts/FileserveCom.py @@ -20,23 +20,23 @@ class FileserveCom(Account): data = self.get_account_data(user) html = self.load("http://app.fileserve.com/api/login/", - post={"username": user, - "password": data['password'], - "submit": "Submit+Query"}) + post={'username': user, + 'password': data['password'], + 'submit': "Submit+Query"}) res = json_loads(html) if res['type'] == "premium": validuntil = time.mktime(time.strptime(res['expireTime'], "%Y-%m-%d %H:%M:%S")) - return {"trafficleft": res['traffic'], "validuntil": validuntil} + return {'trafficleft': res['traffic'], 'validuntil': validuntil} else: - return {"premium": False, "trafficleft": None, "validuntil": None} + return {'premium': False, 'trafficleft': None, 'validuntil': None} def login(self, user, data, req): html = self.load("http://app.fileserve.com/api/login/", - post={"username": user, - "password": data['password'], - "submit" : "Submit+Query"}) + post={'username': user, + 'password': data['password'], + 'submit' : "Submit+Query"}) res = json_loads(html) if not res['type']: @@ -44,7 +44,7 @@ class FileserveCom(Account): #: Login at fileserv html self.load("http://www.fileserve.com/login.php", - post={"loginUserName": user, - "loginUserPassword": data['password'], - "autoLogin": "checked", - "loginFormSubmit": "Login"}) + post={'loginUserName' : user, + 'loginUserPassword': data['password'], + 'autoLogin' : "checked", + 'loginFormSubmit' : "Login"}) diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index 3d84a84e4..faeb0bf94 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -16,7 +16,7 @@ class FourSharedCom(Account): def load_account_info(self, user, req): #: Free mode only for now - return {"premium": False} + return {'premium': False} def login(self, user, data, req): diff --git a/module/plugins/accounts/FreakshareCom.py b/module/plugins/accounts/FreakshareCom.py index a06176a55..5209fa630 100644 --- a/module/plugins/accounts/FreakshareCom.py +++ b/module/plugins/accounts/FreakshareCom.py @@ -37,16 +37,16 @@ class FreakshareCom(Account): except Exception: pass - return {"premium": premium, "validuntil": validuntil, "trafficleft": trafficleft} + return {'premium': premium, 'validuntil': validuntil, 'trafficleft': trafficleft} def login(self, user, data, req): self.load("http://freakshare.com/index.php?language=EN") html = self.load("https://freakshare.com/login.html", - post={"submit": "Login", - "user" : user, - "pass" : data['password']}) + post={'submit': "Login", + 'user' : user, + 'pass' : data['password']}) if ">Wrong Username or Password" in html: self.wrong_password() diff --git a/module/plugins/accounts/FreeWayMe.py b/module/plugins/accounts/FreeWayMe.py index 95977bd0f..2b54a850a 100644 --- a/module/plugins/accounts/FreeWayMe.py +++ b/module/plugins/accounts/FreeWayMe.py @@ -19,15 +19,15 @@ class FreeWayMe(Account): self.log_debug(status) - account_info = {"validuntil": -1, "premium": False} + account_info = {'validuntil': -1, 'premium': False} if status['premium'] == "Free": account_info['trafficleft'] = self.parse_traffic(status['guthaben'] + "MB") elif status['premium'] == "Spender": account_info['trafficleft'] = -1 elif status['premium'] == "Flatrate": - account_info = {"validuntil": float(status['Flatrate']), - "trafficleft": -1, - "premium": True} + account_info = {'validuntil' : float(status['Flatrate']), + 'trafficleft': -1, + 'premium' : True} return account_info @@ -42,7 +42,7 @@ class FreeWayMe(Account): def get_account_status(self, user, req): answer = self.load("http://www.free-way.bz/ajax/jd.php", #@TODO: Revert to `https` in 0.4.10 - get={"id": 4, "user": user, "pass": self.get_account_data(user)['password']}) + get={'id': 4, 'user': user, 'pass': self.get_account_data(user)['password']}) self.log_debug("Login: %s" % answer) diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py index aefc76e41..809807fdb 100644 --- a/module/plugins/accounts/FshareVn.py +++ b/module/plugins/accounts/FshareVn.py @@ -29,7 +29,7 @@ class FshareVn(Account): if re.search(self.LIFETIME_PATTERN, html): self.log_debug("Lifetime membership detected") trafficleft = self.get_traffic_left() - return {"validuntil": -1, "trafficleft": trafficleft, "premium": True} + return {'validuntil': -1, 'trafficleft': trafficleft, 'premium': True} m = re.search(self.VALID_UNTIL_PATTERN, html) if m: @@ -41,7 +41,7 @@ class FshareVn(Account): validuntil = None trafficleft = None - return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium} + return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} def login(self, user, data, req): diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py index 9556f2bda..b4a3b71e9 100644 --- a/module/plugins/accounts/HellshareCz.py +++ b/module/plugins/accounts/HellshareCz.py @@ -48,7 +48,7 @@ class HellshareCz(Account): validuntil = -1 trafficleft = -1 - return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium} + return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} def login(self, user, data, req): diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 45295d379..2424496f9 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -27,7 +27,7 @@ class LetitbitNet(Account): # self.log_warning(api_rep['data']) # return {'valid': False, 'premium': False} - return {"premium": True} + return {'premium': True} def login(self, user, data, req): diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 4f055ff37..791049bac 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -27,10 +27,10 @@ class MegaDebridEu(Account): res = json_loads(jsonResponse) if res['response_code'] == "ok": - return {"premium": True, "validuntil": float(res['vip_end']), "status": True} + return {'premium': True, 'validuntil': float(res['vip_end']), 'status': True} else: self.log_error(res) - return {"status": False, "premium": False} + return {'status': False, 'premium': False} def login(self, user, data, req): diff --git a/module/plugins/accounts/MegaRapidCz.py b/module/plugins/accounts/MegaRapidCz.py index b95a832e6..0bc91148a 100644 --- a/module/plugins/accounts/MegaRapidCz.py +++ b/module/plugins/accounts/MegaRapidCz.py @@ -35,14 +35,14 @@ class MegaRapidCz(Account): m = re.search(self.VALID_UNTIL_PATTERN, htmll) if m: validuntil = time.mktime(time.strptime(m.group(1), "%d.%m.%Y - %H:%M")) - return {"premium": True, "trafficleft": -1, "validuntil": validuntil} + return {'premium': True, 'trafficleft': -1, 'validuntil': validuntil} m = re.search(self.TRAFFIC_LEFT_PATTERN, htmll) if m: trafficleft = float(m.group(1)) * (1 << 20) - return {"premium": True, "trafficleft": trafficleft, "validuntil": -1} + return {'premium': True, 'trafficleft': trafficleft, 'validuntil': -1} - return {"premium": False, "trafficleft": None, "validuntil": None} + return {'premium': False, 'trafficleft': None, 'validuntil': None} def login(self, user, data, req): @@ -53,8 +53,8 @@ class MegaRapidCz(Account): html = html[start + 33:] hashes = html[0:32] html = self.load("https://megarapid.cz/prihlaseni/", - post={"hash" : hashes, - "login" : user, - "pass1" : data['password'], - "remember": 1, - "sbmt" : u"Přihlásit"}) + post={'hash' : hashes, + 'login' : user, + 'pass1' : data['password'], + 'remember': 1, + 'sbmt' : u"Přihlásit"}) diff --git a/module/plugins/accounts/MegasharesCom.py b/module/plugins/accounts/MegasharesCom.py index c91782a5f..62bf71877 100644 --- a/module/plugins/accounts/MegasharesCom.py +++ b/module/plugins/accounts/MegasharesCom.py @@ -33,15 +33,15 @@ class MegasharesCom(Account): except Exception, e: self.log_error(e) - return {"validuntil": validuntil, "trafficleft": -1, "premium": premium} + return {'validuntil': validuntil, 'trafficleft': -1, 'premium': premium} def login(self, user, data, req): html = self.load('http://d01.megashares.com/myms_login.php', - post={"httpref" : "", - "myms_login" : "Login", - "mymslogin_name": user, - "mymspassword" : data['password']}) + post={'httpref' : "", + 'myms_login' : "Login", + 'mymslogin_name': user, + 'mymspassword' : data['password']}) if not '<span class="b ml">%s</span>' % user in html: self.wrong_password() diff --git a/module/plugins/accounts/MultishareCz.py b/module/plugins/accounts/MultishareCz.py index 0c78a6707..cbb607c87 100644 --- a/module/plugins/accounts/MultishareCz.py +++ b/module/plugins/accounts/MultishareCz.py @@ -30,14 +30,14 @@ class MultishareCz(Account): html = self.load("http://www.multishare.cz/") mms_info = dict(re.findall(self.ACCOUNT_INFO_PATTERN, html)) - return dict(mms_info, **{"validuntil": -1, "trafficleft": trafficleft}) + return dict(mms_info, **{'validuntil': -1, 'trafficleft': trafficleft}) def login(self, user, data, req): html = self.load('https://www.multishare.cz/html/prihlaseni_process.php', - post={"akce" : "Přihlásit", - "heslo": data['password'], - "jmeno": user}) + post={'akce' : "Přihlásit", + 'heslo': data['password'], + 'jmeno': user}) if '<div class="akce-chyba akce">' in html: self.wrong_password() diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index 8303c1b52..160a354d0 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -19,7 +19,7 @@ class MyfastfileCom(Account): def load_account_info(self, user, req): if 'days_left' in self.json_data: validuntil = time.time() + self.json_data['days_left'] * 24 * 60 * 60 - return {"premium": True, "validuntil": validuntil, "trafficleft": -1} + return {'premium': True, 'validuntil': validuntil, 'trafficleft': -1} else: self.log_error(_("Unable to get account information")) @@ -27,8 +27,8 @@ class MyfastfileCom(Account): def login(self, user, data, req): #: Password to use is the API-Password written in http://myfastfile.com/myaccount html = self.load("https://myfastfile.com/api.php", - get={"user": user, - "pass": data['password']}) + get={'user': user, + 'pass': data['password']}) self.log_debug("JSON data: " + html) diff --git a/module/plugins/accounts/NowVideoSx.py b/module/plugins/accounts/NowVideoSx.py index 47fedb044..c4c930508 100644 --- a/module/plugins/accounts/NowVideoSx.py +++ b/module/plugins/accounts/NowVideoSx.py @@ -44,7 +44,7 @@ class NowVideoSx(Account): premium = False validuntil = -1 - return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium} + return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} def login(self, user, data, req): diff --git a/module/plugins/accounts/OboomCom.py b/module/plugins/accounts/OboomCom.py index 5557be206..c33d5f4ef 100644 --- a/module/plugins/accounts/OboomCom.py +++ b/module/plugins/accounts/OboomCom.py @@ -36,8 +36,8 @@ class OboomCom(Account): pbkdf2 = PBKDF2(passwd, salt, 1000).hexread(16) result = json_loads(self.load("https://www.oboom.com/1/login", - get={"auth": user, - "pass": pbkdf2})) + get={'auth': user, + 'pass': pbkdf2})) if not result[0] == 200: self.log_warning(_("Failed to log in: %s") % result[1]) diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py index 869000f04..a6ebec39d 100644 --- a/module/plugins/accounts/PremiumizeMe.py +++ b/module/plugins/accounts/PremiumizeMe.py @@ -20,8 +20,8 @@ class PremiumizeMe(Account): self.log_debug(status) #: Parse account info - account_info = {"validuntil": float(status['result']['expires']), - "trafficleft": max(0, status['result']['trafficleft_bytes'] / 1024)} #@TODO: Remove `/ 1024` in 0.4.10 + account_info = {'validuntil': float(status['result']['expires']), + 'trafficleft': max(0, status['result']['trafficleft_bytes'] / 1024)} #@TODO: Remove `/ 1024` in 0.4.10 if status['result']['type'] != 'free': account_info['premium'] = True diff --git a/module/plugins/accounts/QuickshareCz.py b/module/plugins/accounts/QuickshareCz.py index 4054ba180..3a9a79ad9 100644 --- a/module/plugins/accounts/QuickshareCz.py +++ b/module/plugins/accounts/QuickshareCz.py @@ -29,14 +29,14 @@ class QuickshareCz(Account): trafficleft = None premium = False - return {"validuntil": -1, "trafficleft": trafficleft, "premium": premium} + return {'validuntil': -1, 'trafficleft': trafficleft, 'premium': premium} def login(self, user, data, req): html = self.load('http://www.quickshare.cz/html/prihlaseni_process.php', - post={"akce" : u'Přihlásit', - "heslo": data['password'], - "jmeno": user}) + post={'akce' : u'Přihlásit', + 'heslo': data['password'], + 'jmeno': user}) if u'>Takový uživatel neexistuje.<' in html or u'>Špatné heslo.<' in html: self.wrong_password() diff --git a/module/plugins/accounts/RPNetBiz.py b/module/plugins/accounts/RPNetBiz.py index db5dbbb24..66557cbc8 100644 --- a/module/plugins/accounts/RPNetBiz.py +++ b/module/plugins/accounts/RPNetBiz.py @@ -20,14 +20,14 @@ class RPNetBiz(Account): try: if res['accountInfo']['isPremium']: #: Parse account info. Change the trafficleft later to support per host info. - account_info = {"validuntil": float(res['accountInfo']['premiumExpiry']), - "trafficleft": -1, "premium": True} + account_info = {'validuntil': float(res['accountInfo']['premiumExpiry']), + 'trafficleft': -1, 'premium': True} else: - account_info = {"validuntil": None, "trafficleft": None, "premium": False} + account_info = {'validuntil': None, 'trafficleft': None, 'premium': False} except KeyError: #: Handle wrong password exception - account_info = {"validuntil": None, "trafficleft": None, "premium": False} + account_info = {'validuntil': None, 'trafficleft': None, 'premium': False} return account_info @@ -44,8 +44,8 @@ class RPNetBiz(Account): def get_account_status(self, user, req): #: Using the rpnet API, check if valid premium account res = self.load("https://premium.rpnet.biz/client_api.php", - get={"username": user, "password": self.get_account_data(user)['password'], - "action": "showAccountInformation"}) + get={'username': user, 'password': self.get_account_data(user)['password'], + 'action': "showAccountInformation"}) self.log_debug("JSON data: %s" % res) return json_loads(res) diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py index 7732925b7..dfbe338ff 100644 --- a/module/plugins/accounts/RapidgatorNet.py +++ b/module/plugins/accounts/RapidgatorNet.py @@ -58,8 +58,8 @@ class RapidgatorNet(Account): def login(self, user, data, req): try: html = self.load(urlparse.urljoin(self.API_URL, "login"), - post={"username": user, - "password": data['password']}) + post={'username': user, + 'password': data['password']}) self.log_debug("API:LOGIN", html) diff --git a/module/plugins/accounts/RealdebridCom.py b/module/plugins/accounts/RealdebridCom.py index 6ec13e93f..951953257 100644 --- a/module/plugins/accounts/RealdebridCom.py +++ b/module/plugins/accounts/RealdebridCom.py @@ -33,8 +33,8 @@ class RealdebridCom(Account): self.pin_code = False html = self.load("https://real-debrid.com/ajax/login.php", - get={"user": user, - "pass": data['password']}) + get={'user': user, + 'pass': data['password']}) if "Your login informations are incorrect" in html: self.wrong_password() diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py index 84b704f63..858a8b525 100644 --- a/module/plugins/accounts/SimplyPremiumCom.py +++ b/module/plugins/accounts/SimplyPremiumCom.py @@ -34,7 +34,7 @@ class SimplyPremiumCom(Account): if 'remain_traffic' in json_data['result'] and json_data['result']['remain_traffic']: trafficleft = float(json_data['result']['remain_traffic']) / 1024 #@TODO: Remove `/ 1024` in 0.4.10 - return {"premium": premium, "validuntil": validuntil, "trafficleft": trafficleft} + return {'premium': premium, 'validuntil': validuntil, 'trafficleft': trafficleft} def login(self, user, data, req): diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index e0044930f..d773c63ec 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -20,9 +20,9 @@ class SimplydebridCom(Account): res = self.load("http://simply-debrid.com/api.php", get=get_data) data = [x.strip() for x in res.split(";")] if str(data[0]) != "1": - return {"premium": False} + return {'premium': False} else: - return {"trafficleft": -1, "validuntil": time.mktime(time.strptime(str(data[2]), "%d/%m/%Y"))} + return {'trafficleft': -1, 'validuntil': time.mktime(time.strptime(str(data[2]), "%d/%m/%Y"))} def login(self, user, data, req): diff --git a/module/plugins/accounts/TurbobitNet.py b/module/plugins/accounts/TurbobitNet.py index c6cd8d22f..19e8a133b 100644 --- a/module/plugins/accounts/TurbobitNet.py +++ b/module/plugins/accounts/TurbobitNet.py @@ -27,7 +27,7 @@ class TurbobitNet(Account): premium = False validuntil = -1 - return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} + return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil} def login(self, user, data, req): diff --git a/module/plugins/accounts/UploadheroCom.py b/module/plugins/accounts/UploadheroCom.py index bb5eaa6c1..df323d71c 100644 --- a/module/plugins/accounts/UploadheroCom.py +++ b/module/plugins/accounts/UploadheroCom.py @@ -26,17 +26,17 @@ class UploadheroCom(Account): if premium_pattern.search(html): end_date = datetime.date.today() + datetime.timedelta(days=int(premium_pattern.search(html).group(1))) end_date = time.mktime(future.timetuple()) - account_info = {"validuntil": end_date, "trafficleft": -1, "premium": True} + account_info = {'validuntil': end_date, 'trafficleft': -1, 'premium': True} else: - account_info = {"validuntil": -1, "trafficleft": -1, "premium": False} + account_info = {'validuntil': -1, 'trafficleft': -1, 'premium': False} return account_info def login(self, user, data, req): html = self.load("http://uploadhero.co/lib/connexion.php", - post={"pseudo_login": user, - "password_login": data['password']}) + post={'pseudo_login': user, + 'password_login': data['password']}) if "mot de passe invalide" in html: self.wrong_password() diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index c2966f156..00cd91305 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -25,13 +25,13 @@ class YibaishiwuCom(Account): 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}) + return dict({'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium}) def login(self, user, data, req): html = self.load("https://passport.115.com/?ac=login", - post={"back" : "http://www.115.com/", - "goto" : "http://115.com/", + post={'back' : "http://www.115.com/", + 'goto' : "http://115.com/", "login[account]": user, "login[passwd]" : data['password']}) |