diff options
Diffstat (limited to 'module/plugins/accounts')
57 files changed, 95 insertions, 94 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py index 0647892b0..6a2f09c9c 100644 --- a/module/plugins/accounts/AlldebridCom.py +++ b/module/plugins/accounts/AlldebridCom.py @@ -63,4 +63,4 @@ class AlldebridCom(Account): if "This login doesn't exist" in html \ or "The password is not valid" in html \ or "Invalid captcha" in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index 426468ee6..280f008b2 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -33,4 +33,4 @@ class BitshareCom(Account): 'submit' : "Login"}) if "login" in req.lastEffectiveURL: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index f198561f5..92f1cb27e 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -58,4 +58,4 @@ class CatShareNet(Account): 'user[submit]' : "Login"}) if not '<a href="/logout">Wyloguj</a>' in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/CloudzillaTo.py b/module/plugins/accounts/CloudzillaTo.py index b6c65fc8c..0d473eb7d 100644 --- a/module/plugins/accounts/CloudzillaTo.py +++ b/module/plugins/accounts/CloudzillaTo.py @@ -34,4 +34,4 @@ class CloudzillaTo(Account): 'w' : "dologin"}) if "ERROR" in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/CzshareCom.py b/module/plugins/accounts/CzshareCom.py index 4077b5909..e9a34cb83 100644 --- a/module/plugins/accounts/CzshareCom.py +++ b/module/plugins/accounts/CzshareCom.py @@ -51,4 +51,4 @@ class CzshareCom(Account): "login-name" : user}) if '<div class="login' in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/DebridItaliaCom.py b/module/plugins/accounts/DebridItaliaCom.py index cb9771769..9c0956668 100644 --- a/module/plugins/accounts/DebridItaliaCom.py +++ b/module/plugins/accounts/DebridItaliaCom.py @@ -42,4 +42,4 @@ class DebridItaliaCom(Account): 'p': password}) if 'NO' in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/DepositfilesCom.py b/module/plugins/accounts/DepositfilesCom.py index 398a2ac85..848529bc3 100644 --- a/module/plugins/accounts/DepositfilesCom.py +++ b/module/plugins/accounts/DepositfilesCom.py @@ -35,4 +35,4 @@ class DepositfilesCom(Account): 'password': password}) if r'<div class="error_message">Sie haben eine falsche Benutzername-Passwort-Kombination verwendet.</div>' in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/EuroshareEu.py b/module/plugins/accounts/EuroshareEu.py index e61b8e853..bc8618250 100644 --- a/module/plugins/accounts/EuroshareEu.py +++ b/module/plugins/accounts/EuroshareEu.py @@ -39,4 +39,4 @@ class EuroshareEu(Account): 'password': password}) if u">Nesprávne prihlasovacie meno alebo heslo" in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py index 91608c2ae..13edbbb44 100644 --- a/module/plugins/accounts/FastixRu.py +++ b/module/plugins/accounts/FastixRu.py @@ -43,4 +43,4 @@ class FastixRu(Account): data['api'] = api if "error_code" in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/FastshareCz.py b/module/plugins/accounts/FastshareCz.py index 119e26579..90b746624 100644 --- a/module/plugins/accounts/FastshareCz.py +++ b/module/plugins/accounts/FastshareCz.py @@ -48,4 +48,4 @@ class FastshareCz(Account): 'heslo': password}) if ">Wrong username or password" in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py index fb61e507c..56d84e2e4 100644 --- a/module/plugins/accounts/FilecloudIo.py +++ b/module/plugins/accounts/FilecloudIo.py @@ -20,7 +20,7 @@ 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_data(user)['password']}) + post={'username': user, 'password': password}) rep = json_loads(rep) if rep['status'] == "ok": break @@ -56,4 +56,4 @@ class FilecloudIo(Account): post=self.form_data) if "you have successfully logged in" not in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/FilefactoryCom.py b/module/plugins/accounts/FilefactoryCom.py index ee90cfbdf..e3d0c8491 100644 --- a/module/plugins/accounts/FilefactoryCom.py +++ b/module/plugins/accounts/FilefactoryCom.py @@ -46,4 +46,4 @@ class FilefactoryCom(Account): 'Submit' : "Sign In"}) if req.lastEffectiveURL != "http://www.filefactory.com/account/": - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index 5c91c3822..fb251ac5f 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -48,4 +48,4 @@ class FilejungleCom(Account): 'recaptcha_shortencode_field': ""}) if re.search(self.LOGIN_FAILED_PATTERN, html): - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/FilerNet.py b/module/plugins/accounts/FilerNet.py index c4d06690b..674c7a5dd 100644 --- a/module/plugins/accounts/FilerNet.py +++ b/module/plugins/accounts/FilerNet.py @@ -56,4 +56,4 @@ class FilerNet(Account): '_target_path': "https://filer.net/"}) if 'Logout' not in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/FilesMailRu.py b/module/plugins/accounts/FilesMailRu.py index a01de48fd..7ed09e731 100644 --- a/module/plugins/accounts/FilesMailRu.py +++ b/module/plugins/accounts/FilesMailRu.py @@ -28,4 +28,4 @@ class FilesMailRu(Account): 'Page' : "http://files.mail.ru/"}) if "Неверное имя пользователя или пароль" in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/FileserveCom.py b/module/plugins/accounts/FileserveCom.py index 528bf7e58..dabfc1932 100644 --- a/module/plugins/accounts/FileserveCom.py +++ b/module/plugins/accounts/FileserveCom.py @@ -41,7 +41,7 @@ class FileserveCom(Account): res = json_loads(html) if not res['type']: - self.fail() + self.login_fail() #: Login at fileserv html self.load("http://www.fileserve.com/login.php", diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index 448f0e185..ef2140359 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -31,4 +31,4 @@ class FourSharedCom(Account): 'returnTo' : "http://www.4shared.com/account/home.jsp"}) if 'Please log in to access your 4shared account' in res: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/FreakshareCom.py b/module/plugins/accounts/FreakshareCom.py index 404e60ee1..a2f66f3b3 100644 --- a/module/plugins/accounts/FreakshareCom.py +++ b/module/plugins/accounts/FreakshareCom.py @@ -50,4 +50,4 @@ class FreakshareCom(Account): 'pass' : password}) if ">Wrong Username or Password" in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/FreeWayMe.py b/module/plugins/accounts/FreeWayMe.py index bfb2747cb..0c315873f 100644 --- a/module/plugins/accounts/FreeWayMe.py +++ b/module/plugins/accounts/FreeWayMe.py @@ -16,7 +16,7 @@ class FreeWayMe(Account): def parse_info(self, user, password, data, req): - status = self.get_account_status(user, req) + status = self.get_account_status(user, password, req) self.log_debug(status) @@ -34,20 +34,20 @@ class FreeWayMe(Account): def login(self, user, password, data, req): - status = self.get_account_status(user, req) + status = self.get_account_status(user, password, req) #: Check if user and password are valid if not status: - self.fail() + self.login_fail() - def get_account_status(self, user, req): + def get_account_status(self, user, password, 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_data(user)['password']}) + get={'id': 4, 'user': user, 'pass': password}) self.log_debug("Login: %s" % answer) if answer == "Invalid login": - self.fail() + self.login_fail() return json_loads(answer) diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py index 7d7359fd0..bc8ced5e2 100644 --- a/module/plugins/accounts/FshareVn.py +++ b/module/plugins/accounts/FshareVn.py @@ -53,7 +53,7 @@ class FshareVn(Account): 'yt0' : "Login"}) if not re.search(r'<img\s+alt="VIP"', html): - self.fail() + self.login_fail() def get_traffic_left(self): diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py index 7d65d0176..55daa8c2d 100644 --- a/module/plugins/accounts/HellshareCz.py +++ b/module/plugins/accounts/HellshareCz.py @@ -77,4 +77,4 @@ class HellshareCz(Account): 'perm_login': "on"}) if "<p>You input a wrong user name or wrong password</p>" in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/HighWayMe.py b/module/plugins/accounts/HighWayMe.py index f546c2fe1..ff90ec2d2 100644 --- a/module/plugins/accounts/HighWayMe.py +++ b/module/plugins/accounts/HighWayMe.py @@ -47,4 +47,4 @@ class HighWayMe(Account): 'pass': password}) if 'UserOrPassInvalid' in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/Keep2ShareCc.py b/module/plugins/accounts/Keep2ShareCc.py index 3a6100bb3..a7f8564d9 100644 --- a/module/plugins/accounts/Keep2ShareCc.py +++ b/module/plugins/accounts/Keep2ShareCc.py @@ -70,4 +70,4 @@ class Keep2ShareCc(Account): 'yt0' : ""}) if re.search(self.LOGIN_FAIL_PATTERN, html): - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 2d0e1b236..1fc9b76ba 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -17,8 +17,7 @@ class LetitbitNet(Account): def parse_info(self, user, password, data, req): ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## - # api_key = self.get_data(user)['password'] - # json_data = [api_key, ['key/info']] + # json_data = [password, ['key/info']] # api_rep = self.load("http://api.letitbit.net/json", # post={'r': json_dumps(json_data)}) # self.log_debug("API Key Info: " + api_rep) diff --git a/module/plugins/accounts/LinksnappyCom.py b/module/plugins/accounts/LinksnappyCom.py index 9a90cd79d..00ae64b44 100644 --- a/module/plugins/accounts/LinksnappyCom.py +++ b/module/plugins/accounts/LinksnappyCom.py @@ -59,4 +59,4 @@ class LinksnappyCom(Account): 'password': hashlib.md5(password).hexdigest()}) if "Invalid Account Details" in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 682de4db1..d7a04491d 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -41,4 +41,4 @@ class MegaDebridEu(Account): 'password': password}) res = json_loads(jsonResponse) if res['response_code'] != "ok": - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/MegaRapidoNet.py b/module/plugins/accounts/MegaRapidoNet.py index d07df500c..08cf1f535 100644 --- a/module/plugins/accounts/MegaRapidoNet.py +++ b/module/plugins/accounts/MegaRapidoNet.py @@ -49,10 +49,10 @@ class MegaRapidoNet(Account): html = self.load("http://megarapido.net/gerador") if "sair" not in html.lower(): - self.fail() + self.login_fail() else: m = re.search(self.USER_ID_PATTERN, html) if m: data['uid'] = m.group(1) else: - self.fail("Couldn't find the user ID") + self.login_fail("Couldn't find the user ID") diff --git a/module/plugins/accounts/MegasharesCom.py b/module/plugins/accounts/MegasharesCom.py index ef6724512..ec43b7fc0 100644 --- a/module/plugins/accounts/MegasharesCom.py +++ b/module/plugins/accounts/MegasharesCom.py @@ -45,4 +45,4 @@ class MegasharesCom(Account): 'mymspassword' : password}) if not '<span class="b ml">%s</span>' % user in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/MultishareCz.py b/module/plugins/accounts/MultishareCz.py index 2bcbae8f8..c9e30a93f 100644 --- a/module/plugins/accounts/MultishareCz.py +++ b/module/plugins/accounts/MultishareCz.py @@ -41,4 +41,4 @@ class MultishareCz(Account): 'jmeno': user}) if '<div class="akce-chyba akce">' in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index d049b13e6..008b62cc6 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -36,4 +36,4 @@ class MyfastfileCom(Account): self.json_data = json_loads(html) if self.json_data['status'] != 'ok': self.log_error(_('Invalid login. The password to use is the API-Password you find in your "My Account" page')) - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/NitroflareCom.py b/module/plugins/accounts/NitroflareCom.py index f4e9d402a..b7edcca32 100644 --- a/module/plugins/accounts/NitroflareCom.py +++ b/module/plugins/accounts/NitroflareCom.py @@ -79,4 +79,4 @@ class NitroflareCom(Account): 'token' : token}) if re.search(self.LOGIN_FAIL_PATTERN, html): - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/NoPremiumPl.py b/module/plugins/accounts/NoPremiumPl.py index dfd10c6f7..e9dad7647 100644 --- a/module/plugins/accounts/NoPremiumPl.py +++ b/module/plugins/accounts/NoPremiumPl.py @@ -62,10 +62,10 @@ class NoPremiumPl(Account): try: response = json_loads(self.run_auth_query()) except Exception: - self.fail() + self.login_fail() if "errno" in response.keys(): - self.fail() + self.login_fail() data['usr'] = self._usr data['pwd'] = self._pwd diff --git a/module/plugins/accounts/NowVideoSx.py b/module/plugins/accounts/NowVideoSx.py index 8d4add5f6..73bb383be 100644 --- a/module/plugins/accounts/NowVideoSx.py +++ b/module/plugins/accounts/NowVideoSx.py @@ -54,4 +54,4 @@ class NowVideoSx(Account): 'pass': password}) if re.search(r'>Log In<', html): - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/OboomCom.py b/module/plugins/accounts/OboomCom.py index 5dc1fcae2..fcb309132 100644 --- a/module/plugins/accounts/OboomCom.py +++ b/module/plugins/accounts/OboomCom.py @@ -32,7 +32,7 @@ class OboomCom(Account): def load_account_data(self, user, req): - passwd = self.get_data(user)['password'] + passwd = self.get_info(user)['login']['password'] salt = passwd[::-1] pbkdf2 = PBKDF2(passwd, salt, 1000).hexread(16) @@ -42,7 +42,7 @@ class OboomCom(Account): if not result[0] == 200: self.log_warning(_("Failed to log in: %s") % result[1]) - self.fail() + self.login_fail() return result[1] diff --git a/module/plugins/accounts/OneFichierCom.py b/module/plugins/accounts/OneFichierCom.py index 2553462ca..3a0131a3f 100644 --- a/module/plugins/accounts/OneFichierCom.py +++ b/module/plugins/accounts/OneFichierCom.py @@ -55,4 +55,4 @@ class OneFichierCom(Account): 'valider': "Send"}) if '>Invalid email address' in html or '>Invalid password' in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index 5e7625244..6741b674f 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -39,4 +39,4 @@ class OverLoadMe(Account): data = json_loads(jsondata) if data['err'] == 1: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/PremiumTo.py b/module/plugins/accounts/PremiumTo.py index e25b3b33e..ba8f24c6d 100644 --- a/module/plugins/accounts/PremiumTo.py +++ b/module/plugins/accounts/PremiumTo.py @@ -36,4 +36,4 @@ class PremiumTo(Account): 'password': self.password}) if "wrong username" in authcode: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py index 11a2c648f..19fce0e77 100644 --- a/module/plugins/accounts/PremiumizeMe.py +++ b/module/plugins/accounts/PremiumizeMe.py @@ -17,7 +17,7 @@ class PremiumizeMe(Account): def parse_info(self, user, password, data, req): #: Get user data from premiumize.me - status = self.get_account_status(user, req) + status = self.get_account_status(user, password, req) self.log_debug(status) #: Parse account info @@ -32,18 +32,18 @@ class PremiumizeMe(Account): def login(self, user, password, data, req): #: Get user data from premiumize.me - status = self.get_account_status(user, req) + status = self.get_account_status(user, password, req) #: Check if user and password are valid if status['status'] != 200: - self.fail() + self.login_fail() - def get_account_status(self, user, req): + def get_account_status(self, user, password, req): #: Use premiumize.me API v1 (see https://secure.premiumize.me/?show=api) #: To retrieve account info and return the parsed json answer answer = self.load("http://api.premiumize.me/pm-api/v1.php", #@TODO: Revert to `https` in 0.4.10 get={'method' : "accountstatus", 'params[login]': user, - 'params[pass]' : self.get_data(user)['password']}) + 'params[pass]' : password}) return json_loads(answer) diff --git a/module/plugins/accounts/QuickshareCz.py b/module/plugins/accounts/QuickshareCz.py index b1416d967..42022ec82 100644 --- a/module/plugins/accounts/QuickshareCz.py +++ b/module/plugins/accounts/QuickshareCz.py @@ -40,4 +40,4 @@ class QuickshareCz(Account): 'jmeno': user}) if u'>Takový uživatel neexistuje.<' in html or u'>Špatné heslo.<' in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/RPNetBiz.py b/module/plugins/accounts/RPNetBiz.py index cd1523a92..5fd7e5878 100644 --- a/module/plugins/accounts/RPNetBiz.py +++ b/module/plugins/accounts/RPNetBiz.py @@ -17,7 +17,7 @@ class RPNetBiz(Account): def parse_info(self, user, password, data, req): #: Get account information from rpnet.biz - res = self.get_account_status(user, req) + res = self.get_account_status(user, password, req) try: if res['accountInfo']['isPremium']: #: Parse account info. Change the trafficleft later to support per host info. @@ -35,17 +35,17 @@ class RPNetBiz(Account): def login(self, user, password, data, req): #: Get account information from rpnet.biz - res = self.get_account_status(user, req) + res = self.get_account_status(user, password, req) #: If we have an error in the res, we have wrong login information if 'error' in res: - self.fail() + self.login_fail() - def get_account_status(self, user, req): + def get_account_status(self, user, password 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_data(user)['password'], + get={'username': user, 'password': password, 'action': "showAccountInformation"}) self.log_debug("JSON data: %s" % res) diff --git a/module/plugins/accounts/RapideoPl.py b/module/plugins/accounts/RapideoPl.py index 6e2c0a134..42d084bdb 100644 --- a/module/plugins/accounts/RapideoPl.py +++ b/module/plugins/accounts/RapideoPl.py @@ -62,10 +62,10 @@ class RapideoPl(Account): try: response = json_loads(self.run_auth_query()) except Exception: - self.fail() + self.login_fail() if "errno" in response.keys(): - self.fail() + self.login_fail() data['usr'] = self._usr data['pwd'] = self._pwd diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py index 56f3aa866..5ce51a1ec 100644 --- a/module/plugins/accounts/RapidgatorNet.py +++ b/module/plugins/accounts/RapidgatorNet.py @@ -75,4 +75,4 @@ class RapidgatorNet(Account): except Exception, e: self.log_error(e) - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/RapiduNet.py b/module/plugins/accounts/RapiduNet.py index 29c939602..1ec29bd77 100644 --- a/module/plugins/accounts/RapiduNet.py +++ b/module/plugins/accounts/RapiduNet.py @@ -63,4 +63,4 @@ class RapiduNet(Account): self.log_debug(json) if not json['message'] == "success": - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/RealdebridCom.py b/module/plugins/accounts/RealdebridCom.py index c39293ce6..718850c1a 100644 --- a/module/plugins/accounts/RealdebridCom.py +++ b/module/plugins/accounts/RealdebridCom.py @@ -38,7 +38,7 @@ class RealdebridCom(Account): 'pass': password}) if "Your login informations are incorrect" in html: - self.fail() + self.login_fail() elif "PIN Code required" in html: self.log_warning(_("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")) diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py index 1bfd79088..36e5e33eb 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -21,8 +21,9 @@ class RehostTo(Account): session = "" html = self.load("https://rehost.to/api.php", - get={'cmd' : "login", 'user': user, - 'pass': self.get_data(user)['password']}) + get={'cmd' : "login", + 'user': user, + 'pass': password}) try: session = html.split(",")[1].split("=")[1] @@ -54,4 +55,4 @@ class RehostTo(Account): if "ERROR" in html: self.log_debug(html) - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py index 85cdfecd9..31a1a24c6 100644 --- a/module/plugins/accounts/ShareonlineBiz.py +++ b/module/plugins/accounts/ShareonlineBiz.py @@ -16,12 +16,12 @@ class ShareonlineBiz(Account): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - def api_response(self, user, req): + def api_response(self, user, password, req): return self.load("http://api.share-online.biz/cgi-bin", get={'q' : "userdetails", 'aux' : "traffic", 'username': user, - 'password': self.get_data(user)['password']}) + 'password': password}) def parse_info(self, user, password, data, req): @@ -31,7 +31,7 @@ class ShareonlineBiz(Account): maxtraffic = 100 * 1024 * 1024 * 1024 #: 100 GB api = {} - for line in self.api_response(user, req).splitlines(): + for line in self.api_response(user, password, req).splitlines(): if "=" in line: key, value = line.split("=") api[key] = value @@ -62,8 +62,8 @@ class ShareonlineBiz(Account): def login(self, user, password, data, req): - html = self.api_response(user, req) + html = self.api_response(user, password, req) err = re.search(r'\*\*(.+?)\*\*', html) if err: self.log_error(err.group(1).strip()) - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py index 534a75be8..f8b5ff50b 100644 --- a/module/plugins/accounts/SimplyPremiumCom.py +++ b/module/plugins/accounts/SimplyPremiumCom.py @@ -45,4 +45,4 @@ class SimplyPremiumCom(Account): post={'key': user} if not password else {'login_name': user, 'login_pass': password}) if 'logout' not in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index b123021dd..84c38227e 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -17,8 +17,10 @@ class SimplydebridCom(Account): def parse_info(self, user, password, data, req): - get_data = {'login': 2, 'u': self.loginname, 'p': self.password} - res = self.load("http://simply-debrid.com/api.php", get=get_data) + res = self.load("http://simply-debrid.com/api.php", + get={'login': 2, + 'u' : user, + 'p' : password}) data = [x.strip() for x in res.split(";")] if str(data[0]) != "1": return {'premium': False} @@ -27,10 +29,9 @@ class SimplydebridCom(Account): def login(self, user, password, data, req): - self.loginname = user - self.password = password - get_data = {'login': 1, 'u': self.loginname, 'p': self.password} - - res = self.load("https://simply-debrid.com/api.php", get=get_data) + res = self.load("https://simply-debrid.com/api.php", + get={'login': 1, + 'u' : user, + 'p' : password}) if res != "02: loggin success": - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py index 2201e4294..9c2451794 100644 --- a/module/plugins/accounts/SmoozedCom.py +++ b/module/plugins/accounts/SmoozedCom.py @@ -35,7 +35,7 @@ class SmoozedCom(Account): def parse_info(self, user, password, data, req): - status = self.get_account_status(user, req) + status = self.get_account_status(user, password, req) self.log_debug(status) @@ -63,15 +63,15 @@ class SmoozedCom(Account): def login(self, user, password, data, req): #: Get user data from premiumize.me - status = self.get_account_status(user, req) + status = self.get_account_status(user, password, req) #: Check if user and password are valid if status['state'] != 'ok': - self.fail() + self.login_fail() - def get_account_status(self, user, req): - password = self.get_data(user)['password'] + def get_account_status(self, user, password, req): + password = password salt = hashlib.sha256(password).hexdigest() encrypted = PBKDF2(password, salt, iterations=1000).hexread(32) diff --git a/module/plugins/accounts/TurbobitNet.py b/module/plugins/accounts/TurbobitNet.py index afed6efbc..9dd3e4d3c 100644 --- a/module/plugins/accounts/TurbobitNet.py +++ b/module/plugins/accounts/TurbobitNet.py @@ -40,4 +40,4 @@ class TurbobitNet(Account): "user[submit]": "Login"}) if not '<div class="menu-item user-name">' in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/UlozTo.py b/module/plugins/accounts/UlozTo.py index ed4c11a23..00e125dbc 100644 --- a/module/plugins/accounts/UlozTo.py +++ b/module/plugins/accounts/UlozTo.py @@ -46,4 +46,4 @@ class UlozTo(Account): 'remember': "on"}) if '<div class="flash error">' in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/UploadableCh.py b/module/plugins/accounts/UploadableCh.py index e1865bb52..9c2649e51 100644 --- a/module/plugins/accounts/UploadableCh.py +++ b/module/plugins/accounts/UploadableCh.py @@ -31,4 +31,4 @@ class UploadableCh(Account): 'action__login': "normalLogin"}) if "Login failed" in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py index 407658354..3b733ae23 100644 --- a/module/plugins/accounts/UploadedTo.py +++ b/module/plugins/accounts/UploadedTo.py @@ -70,4 +70,4 @@ class UploadedTo(Account): '_': ""}) if '"err"' in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/UploadheroCom.py b/module/plugins/accounts/UploadheroCom.py index 0b82f0e5a..f31b01d03 100644 --- a/module/plugins/accounts/UploadheroCom.py +++ b/module/plugins/accounts/UploadheroCom.py @@ -40,4 +40,4 @@ class UploadheroCom(Account): 'password_login': password}) if "mot de passe invalide" in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/WebshareCz.py b/module/plugins/accounts/WebshareCz.py index 1f2adb7f5..bbfb90a92 100644 --- a/module/plugins/accounts/WebshareCz.py +++ b/module/plugins/accounts/WebshareCz.py @@ -47,7 +47,7 @@ class WebshareCz(Account): 'wst' : ""}) if "<status>OK</status>" not in salt: - self.fail() + self.login_fail() salt = re.search('<salt>(.+)</salt>', salt).group(1) password = hashlib.sha1(md5_crypt.encrypt(password, salt=salt)).hexdigest() @@ -61,6 +61,6 @@ class WebshareCz(Account): 'wst' : ""}) if "<status>OK</status>" not in login: - self.fail() + self.login_fail() data['wst'] = re.search('<token>(.+)</token>', login).group(1) diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index a1886c945..c5dda0921 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -37,4 +37,4 @@ class YibaishiwuCom(Account): "login[passwd]" : password}) if not 'var USER_PERMISSION = {' in html: - self.fail() + self.login_fail() diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index c7c958834..4138ba3cc 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -53,7 +53,7 @@ class ZeveraCom(Account): self.password = password if self.api_response(req) == "No trafic": - self.fail() + self.login_fail() def api_response(self, req, just_header=False, **kwargs): |