diff options
Diffstat (limited to 'module/plugins')
62 files changed, 140 insertions, 140 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py index 6a2f09c9c..a468b5b99 100644 --- a/module/plugins/accounts/AlldebridCom.py +++ b/module/plugins/accounts/AlldebridCom.py @@ -20,7 +20,7 @@ class AlldebridCom(Account): __authors__ = [("Andy Voigt", "spamsales@online.de")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): data = self.get_data(user) html = self.load("http://www.alldebrid.com/account/") soup = BeautifulSoup.BeautifulSoup(html) @@ -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.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index 280f008b2..96e447e0d 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -14,7 +14,7 @@ class BitshareCom(Account): __authors__ = [("Paul King", None)] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load("http://bitshare.com/mysettings.html") if "\"http://bitshare.com/myupgrade.html\">Free" in html: @@ -33,4 +33,4 @@ class BitshareCom(Account): 'submit' : "Login"}) if "login" in req.lastEffectiveURL: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index 92f1cb27e..4232ed72b 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -22,7 +22,7 @@ class CatShareNet(Account): TRAFFIC_LEFT_PATTERN = r'<a href="/premium">([0-9.]+ [kMG]B)' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): premium = False validuntil = -1 trafficleft = -1 @@ -58,4 +58,4 @@ class CatShareNet(Account): 'user[submit]' : "Login"}) if not '<a href="/logout">Wyloguj</a>' in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/CloudzillaTo.py b/module/plugins/accounts/CloudzillaTo.py index 0d473eb7d..a135aee3a 100644 --- a/module/plugins/accounts/CloudzillaTo.py +++ b/module/plugins/accounts/CloudzillaTo.py @@ -19,7 +19,7 @@ class CloudzillaTo(Account): PREMIUM_PATTERN = r'<h2>account type</h2>\s*Premium Account' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load("http://www.cloudzilla.to/") premium = True if re.search(self.PREMIUM_PATTERN, html) else False @@ -34,4 +34,4 @@ class CloudzillaTo(Account): 'w' : "dologin"}) if "ERROR" in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/CzshareCom.py b/module/plugins/accounts/CzshareCom.py index e9a34cb83..3d670e28a 100644 --- a/module/plugins/accounts/CzshareCom.py +++ b/module/plugins/accounts/CzshareCom.py @@ -21,7 +21,7 @@ class CzshareCom(Account): CREDIT_LEFT_PATTERN = r'<tr class="active">\s*<td>([\d ,]+) (KiB|MiB|GiB)</td>\s*<td>([^<]*)</td>\s*</tr>' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): premium = False validuntil = None trafficleft = None @@ -51,4 +51,4 @@ class CzshareCom(Account): "login-name" : user}) if '<div class="login' in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/DebridItaliaCom.py b/module/plugins/accounts/DebridItaliaCom.py index 9c0956668..195cfae7b 100644 --- a/module/plugins/accounts/DebridItaliaCom.py +++ b/module/plugins/accounts/DebridItaliaCom.py @@ -21,7 +21,7 @@ class DebridItaliaCom(Account): WALID_UNTIL_PATTERN = r'Premium valid till: (.+?) \|' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): info = {'premium': False, 'validuntil': None, 'trafficleft': None} html = self.load("http://debriditalia.com/") @@ -42,4 +42,4 @@ class DebridItaliaCom(Account): 'p': password}) if 'NO' in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/DepositfilesCom.py b/module/plugins/accounts/DepositfilesCom.py index 848529bc3..e7be851f5 100644 --- a/module/plugins/accounts/DepositfilesCom.py +++ b/module/plugins/accounts/DepositfilesCom.py @@ -19,7 +19,7 @@ class DepositfilesCom(Account): ("Walter Purcaro", "vuolter@gmail.com")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load("https://dfiles.eu/de/gold/") validuntil = re.search(r"Sie haben Gold Zugang bis: <b>(.*?)</b></div>", html).group(1) @@ -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.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/EuroshareEu.py b/module/plugins/accounts/EuroshareEu.py index bc8618250..701629221 100644 --- a/module/plugins/accounts/EuroshareEu.py +++ b/module/plugins/accounts/EuroshareEu.py @@ -17,7 +17,7 @@ class EuroshareEu(Account): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): self.relogin(user) html = self.load("http://euroshare.eu/customer-zone/settings/") @@ -39,4 +39,4 @@ class EuroshareEu(Account): 'password': password}) if u">Nesprávne prihlasovacie meno alebo heslo" in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py index 13edbbb44..99510f2ff 100644 --- a/module/plugins/accounts/FastixRu.py +++ b/module/plugins/accounts/FastixRu.py @@ -15,7 +15,7 @@ class FastixRu(Account): __authors__ = [("Massimo Rosamilia", "max@spiritix.eu")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): data = self.get_data(user) html = json_loads(self.load("http://fastix.ru/api_v2/", get={'apikey': data['api'], @@ -43,4 +43,4 @@ class FastixRu(Account): data['api'] = api if "error_code" in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/FastshareCz.py b/module/plugins/accounts/FastshareCz.py index 3a3769a1c..253d8ee23 100644 --- a/module/plugins/accounts/FastshareCz.py +++ b/module/plugins/accounts/FastshareCz.py @@ -21,7 +21,7 @@ class FastshareCz(Account): CREDIT_PATTERN = r'Credit\s*:\s*</td>\s*<td>(.+?)\s*<' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): validuntil = -1 trafficleft = None premium = False @@ -49,4 +49,4 @@ class FastshareCz(Account): 'heslo': password}) if ">Wrong username or password" in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py index bdb13bd3d..024057bc4 100644 --- a/module/plugins/accounts/FilecloudIo.py +++ b/module/plugins/accounts/FilecloudIo.py @@ -17,7 +17,7 @@ class FilecloudIo(Account): ("stickell", "l.stickell@yahoo.it")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): #: 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", @@ -57,4 +57,4 @@ class FilecloudIo(Account): post=self.form_data) if "you have successfully logged in" not in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/FilefactoryCom.py b/module/plugins/accounts/FilefactoryCom.py index e3d0c8491..e1957f515 100644 --- a/module/plugins/accounts/FilefactoryCom.py +++ b/module/plugins/accounts/FilefactoryCom.py @@ -22,7 +22,7 @@ class FilefactoryCom(Account): VALID_UNTIL_PATTERN = r'Premium valid until: <strong>(?P<D>\d{1,2})\w{1,2} (?P<M>\w{3}), (?P<Y>\d{4})</strong>' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load("http://www.filefactory.com/account/") m = re.search(self.VALID_UNTIL_PATTERN, html) @@ -46,4 +46,4 @@ class FilefactoryCom(Account): 'Submit' : "Sign In"}) if req.lastEffectiveURL != "http://www.filefactory.com/account/": - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index fb251ac5f..ba9f8d248 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -25,7 +25,7 @@ class FilejungleCom(Account): LOGIN_FAILED_PATTERN = r'<span htmlfor="loginUser(Name|Password)" generated="true" class="fail_info">' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load(self.URL + "dashboard.php") m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: @@ -48,4 +48,4 @@ class FilejungleCom(Account): 'recaptcha_shortencode_field': ""}) if re.search(self.LOGIN_FAILED_PATTERN, html): - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/FilerNet.py b/module/plugins/accounts/FilerNet.py index 674c7a5dd..46b920b3a 100644 --- a/module/plugins/accounts/FilerNet.py +++ b/module/plugins/accounts/FilerNet.py @@ -23,7 +23,7 @@ class FilerNet(Account): FREE_PATTERN = r'Account Status</th>\s*<td>\s*Free' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load("https://filer.net/profile") #: Free user @@ -56,4 +56,4 @@ class FilerNet(Account): '_target_path': "https://filer.net/"}) if 'Logout' not in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/FilesMailRu.py b/module/plugins/accounts/FilesMailRu.py index 7ed09e731..a52ac9e0d 100644 --- a/module/plugins/accounts/FilesMailRu.py +++ b/module/plugins/accounts/FilesMailRu.py @@ -14,7 +14,7 @@ class FilesMailRu(Account): __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): return {'validuntil': None, 'trafficleft': None} @@ -28,4 +28,4 @@ class FilesMailRu(Account): 'Page' : "http://files.mail.ru/"}) if "Неверное имя пользователя или пароль" in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/FileserveCom.py b/module/plugins/accounts/FileserveCom.py index dabfc1932..cdf842c9f 100644 --- a/module/plugins/accounts/FileserveCom.py +++ b/module/plugins/accounts/FileserveCom.py @@ -17,7 +17,7 @@ class FileserveCom(Account): __authors__ = [("mkaay", "mkaay@mkaay.de")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): data = self.get_data(user) html = self.load("http://app.fileserve.com/api/login/", @@ -41,7 +41,7 @@ class FileserveCom(Account): res = json_loads(html) if not res['type']: - self.login_fail() + self.fail_login() #: 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 a7ec8e2c5..4dce0c7ac 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -16,7 +16,7 @@ class FourSharedCom(Account): ("stickell", "l.stickell@yahoo.it")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): #: Free mode only for now return {'premium': False} @@ -32,4 +32,4 @@ class FourSharedCom(Account): 'returnTo' : "http://www.4shared.com/account/home.jsp"}) if 'Please log in to access your 4shared account' in res: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/FreakshareCom.py b/module/plugins/accounts/FreakshareCom.py index a2f66f3b3..fef7bc4dc 100644 --- a/module/plugins/accounts/FreakshareCom.py +++ b/module/plugins/accounts/FreakshareCom.py @@ -17,7 +17,7 @@ class FreakshareCom(Account): __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): premium = False validuntil = None trafficleft = None @@ -50,4 +50,4 @@ class FreakshareCom(Account): 'pass' : password}) if ">Wrong Username or Password" in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/FreeWayMe.py b/module/plugins/accounts/FreeWayMe.py index 0c315873f..49e82ca54 100644 --- a/module/plugins/accounts/FreeWayMe.py +++ b/module/plugins/accounts/FreeWayMe.py @@ -15,7 +15,7 @@ class FreeWayMe(Account): __authors__ = [("Nicolas Giese", "james@free-way.me")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): status = self.get_account_status(user, password, req) self.log_debug(status) @@ -38,7 +38,7 @@ class FreeWayMe(Account): #: Check if user and password are valid if not status: - self.login_fail() + self.fail_login() def get_account_status(self, user, password, req): @@ -48,6 +48,6 @@ class FreeWayMe(Account): self.log_debug("Login: %s" % answer) if answer == "Invalid login": - self.login_fail() + self.fail_login() return json_loads(answer) diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py index bc8ced5e2..0ce7c718a 100644 --- a/module/plugins/accounts/FshareVn.py +++ b/module/plugins/accounts/FshareVn.py @@ -24,7 +24,7 @@ class FshareVn(Account): DIRECT_DOWNLOAD_PATTERN = ur'<input type="checkbox"\s*([^=>]*)[^>]*/>Kích hoạt download trực tiếp</dt>' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load("http://www.fshare.vn/account_info.php") if re.search(self.LIFETIME_PATTERN, html): @@ -53,7 +53,7 @@ class FshareVn(Account): 'yt0' : "Login"}) if not re.search(r'<img\s+alt="VIP"', html): - self.login_fail() + self.fail_login() def get_traffic_left(self): diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py index 55daa8c2d..f48328ae9 100644 --- a/module/plugins/accounts/HellshareCz.py +++ b/module/plugins/accounts/HellshareCz.py @@ -20,7 +20,7 @@ class HellshareCz(Account): CREDIT_LEFT_PATTERN = r'<div class="credit-link">\s*<table>\s*<tr>\s*<th>(\d+|\d\d\.\d\d\.)</th>' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): self.relogin(user) html = self.load("http://www.hellshare.com/") @@ -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.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/HighWayMe.py b/module/plugins/accounts/HighWayMe.py index ff90ec2d2..61ff64bee 100644 --- a/module/plugins/accounts/HighWayMe.py +++ b/module/plugins/accounts/HighWayMe.py @@ -15,7 +15,7 @@ class HighWayMe(Account): __authors__ = [("EvolutionClip", "evolutionclip@live.de")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): premium = False validuntil = -1 trafficleft = None @@ -47,4 +47,4 @@ class HighWayMe(Account): 'pass': password}) if 'UserOrPassInvalid' in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/Keep2ShareCc.py b/module/plugins/accounts/Keep2ShareCc.py index 014d43a69..3c9a42808 100644 --- a/module/plugins/accounts/Keep2ShareCc.py +++ b/module/plugins/accounts/Keep2ShareCc.py @@ -25,7 +25,7 @@ class Keep2ShareCc(Account): LOGIN_FAIL_PATTERN = r'Please fix the following input errors' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): validuntil = None trafficleft = -1 premium = False @@ -71,4 +71,4 @@ class Keep2ShareCc(Account): 'yt0' : ""}) if re.search(self.LOGIN_FAIL_PATTERN, html): - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 1fc9b76ba..4b2177e28 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -15,7 +15,7 @@ class LetitbitNet(Account): __authors__ = [("stickell", "l.stickell@yahoo.it")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## # json_data = [password, ['key/info']] # api_rep = self.load("http://api.letitbit.net/json", diff --git a/module/plugins/accounts/LinksnappyCom.py b/module/plugins/accounts/LinksnappyCom.py index 00ae64b44..f26b9bf60 100644 --- a/module/plugins/accounts/LinksnappyCom.py +++ b/module/plugins/accounts/LinksnappyCom.py @@ -17,7 +17,7 @@ class LinksnappyCom(Account): __authors__ = [("stickell", "l.stickell@yahoo.it")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): data = self.get_data(user) r = self.load('http://gen.linksnappy.com/lseAPI.php', get={'act' : 'USERDETAILS', @@ -59,4 +59,4 @@ class LinksnappyCom(Account): 'password': hashlib.md5(password).hexdigest()}) if "Invalid Account Details" in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index d7a04491d..7c40eec6c 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -19,7 +19,7 @@ class MegaDebridEu(Account): API_URL = "https://www.mega-debrid.eu/api.php" - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): data = self.get_data(user) jsonResponse = self.load(self.API_URL, get={'action' : 'connectUser', @@ -41,4 +41,4 @@ class MegaDebridEu(Account): 'password': password}) res = json_loads(jsonResponse) if res['response_code'] != "ok": - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/MegaRapidCz.py b/module/plugins/accounts/MegaRapidCz.py index ce2d78994..4e044a910 100644 --- a/module/plugins/accounts/MegaRapidCz.py +++ b/module/plugins/accounts/MegaRapidCz.py @@ -25,7 +25,7 @@ class MegaRapidCz(Account): TRAFFIC_LEFT_PATTERN = r'<tr><td>Kredit</td><td>(.*?) GiB' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): htmll = self.load("http://megarapid.cz/mujucet/") m = re.search(self.LIMITDL_PATTERN, htmll) diff --git a/module/plugins/accounts/MegaRapidoNet.py b/module/plugins/accounts/MegaRapidoNet.py index 08cf1f535..19d6c12ab 100644 --- a/module/plugins/accounts/MegaRapidoNet.py +++ b/module/plugins/accounts/MegaRapidoNet.py @@ -21,7 +21,7 @@ class MegaRapidoNet(Account): USER_ID_PATTERN = r'<\s*?div[^>]*?class\s*?=\s*?["\']checkbox_compartilhar["\'].*?>.*?<\s*?input[^>]*?name\s*?=\s*?["\']usar["\'].*?>.*?<\s*?input[^>]*?name\s*?=\s*?["\']user["\'][^>]*?value\s*?=\s*?["\'](.*?)\s*?["\']' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): validuntil = None trafficleft = None premium = False @@ -49,10 +49,10 @@ class MegaRapidoNet(Account): html = self.load("http://megarapido.net/gerador") if "sair" not in html.lower(): - self.login_fail() + self.fail_login() else: m = re.search(self.USER_ID_PATTERN, html) if m: data['uid'] = m.group(1) else: - self.login_fail("Couldn't find the user ID") + self.fail_login("Couldn't find the user ID") diff --git a/module/plugins/accounts/MegasharesCom.py b/module/plugins/accounts/MegasharesCom.py index ec43b7fc0..bad3f5896 100644 --- a/module/plugins/accounts/MegasharesCom.py +++ b/module/plugins/accounts/MegasharesCom.py @@ -20,7 +20,7 @@ class MegasharesCom(Account): VALID_UNTIL_PATTERN = r'<p class="premium_info_box">Period Ends: (\w{3} \d{1,2}, \d{4})</p>' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): # self.relogin(user) html = self.load("http://d01.megashares.com/myms.php") @@ -45,4 +45,4 @@ class MegasharesCom(Account): 'mymspassword' : password}) if not '<span class="b ml">%s</span>' % user in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/MultishareCz.py b/module/plugins/accounts/MultishareCz.py index c9e30a93f..1956ac1ed 100644 --- a/module/plugins/accounts/MultishareCz.py +++ b/module/plugins/accounts/MultishareCz.py @@ -20,7 +20,7 @@ class MultishareCz(Account): ACCOUNT_INFO_PATTERN = r'<input type="hidden" id="(u_ID|u_hash)" name=".+?" value="(.+?)">' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): # self.relogin(user) html = self.load("http://www.multishare.cz/profil/") @@ -41,4 +41,4 @@ class MultishareCz(Account): 'jmeno': user}) if '<div class="akce-chyba akce">' in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index 008b62cc6..edc081660 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -17,7 +17,7 @@ class MyfastfileCom(Account): __authors__ = [("stickell", "l.stickell@yahoo.it")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, 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} @@ -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.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/NitroflareCom.py b/module/plugins/accounts/NitroflareCom.py index b7edcca32..58646dfdb 100644 --- a/module/plugins/accounts/NitroflareCom.py +++ b/module/plugins/accounts/NitroflareCom.py @@ -24,7 +24,7 @@ class NitroflareCom(Account): TOKEN_PATTERN = r'name="token" value="(.+?)"' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): validuntil = -1 trafficleft = None premium = False @@ -79,4 +79,4 @@ class NitroflareCom(Account): 'token' : token}) if re.search(self.LOGIN_FAIL_PATTERN, html): - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/NoPremiumPl.py b/module/plugins/accounts/NoPremiumPl.py index 97e58f5f0..79369e105 100644 --- a/module/plugins/accounts/NoPremiumPl.py +++ b/module/plugins/accounts/NoPremiumPl.py @@ -32,7 +32,7 @@ class NoPremiumPl(Account): _pwd = None - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): self._req = req try: result = json_loads(self.run_auth_query()) @@ -62,10 +62,10 @@ class NoPremiumPl(Account): try: response = json_loads(self.run_auth_query()) except Exception: - self.login_fail() + self.fail_login() if "errno" in response.keys(): - self.login_fail() + self.fail_login() data['usr'] = self._usr data['pwd'] = self._pwd diff --git a/module/plugins/accounts/NowVideoSx.py b/module/plugins/accounts/NowVideoSx.py index 73bb383be..fc53ad13c 100644 --- a/module/plugins/accounts/NowVideoSx.py +++ b/module/plugins/accounts/NowVideoSx.py @@ -20,7 +20,7 @@ class NowVideoSx(Account): VALID_UNTIL_PATTERN = r'>Your premium membership expires on: (.+?)<' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): validuntil = None trafficleft = -1 premium = None @@ -54,4 +54,4 @@ class NowVideoSx(Account): 'pass': password}) if re.search(r'>Log In<', html): - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/OboomCom.py b/module/plugins/accounts/OboomCom.py index a792848ea..c3acf284e 100644 --- a/module/plugins/accounts/OboomCom.py +++ b/module/plugins/accounts/OboomCom.py @@ -42,12 +42,12 @@ class OboomCom(Account): if result[0] != 200: self.log_warning(_("Failed to log in: %s") % result[1]) - self.login_fail() + self.fail_login() return result[1] - def parse_info(self, name, req): + def grab_info(self, name, req): account_data = self.load_account_data(name, req) userData = account_data['user'] diff --git a/module/plugins/accounts/OneFichierCom.py b/module/plugins/accounts/OneFichierCom.py index e2e84feef..795d2335d 100644 --- a/module/plugins/accounts/OneFichierCom.py +++ b/module/plugins/accounts/OneFichierCom.py @@ -22,7 +22,7 @@ class OneFichierCom(Account): VALID_UNTIL_PATTERN = r'Your subscription will end the (\d+-\d+-\d+)' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): validuntil = None trafficleft = -1 premium = None @@ -55,4 +55,4 @@ class OneFichierCom(Account): 'valider': "Send"}) if '>Invalid email address' in html or '>Invalid password' in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index 6741b674f..f9f8b300d 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -15,7 +15,7 @@ class OverLoadMe(Account): __authors__ = [("marley", "marley@over-load.me")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): data = self.get_data(user) html = self.load("https://api.over-load.me/account.php", get={'user': user, @@ -39,4 +39,4 @@ class OverLoadMe(Account): data = json_loads(jsondata) if data['err'] == 1: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/PremiumTo.py b/module/plugins/accounts/PremiumTo.py index ba8f24c6d..447520a84 100644 --- a/module/plugins/accounts/PremiumTo.py +++ b/module/plugins/accounts/PremiumTo.py @@ -16,7 +16,7 @@ class PremiumTo(Account): ("stickell", "l.stickell@yahoo.it")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): traffic = self.load("http://premium.to/api/straffic.php", #@TODO: Revert to `https` in 0.4.10 get={'username': self.username, 'password': self.password}) @@ -36,4 +36,4 @@ class PremiumTo(Account): 'password': self.password}) if "wrong username" in authcode: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py index df3b5db51..0a61b9920 100644 --- a/module/plugins/accounts/PremiumizeMe.py +++ b/module/plugins/accounts/PremiumizeMe.py @@ -15,7 +15,7 @@ class PremiumizeMe(Account): __authors__ = [("Florian Franzen", "FlorianFranzen@gmail.com")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): #: Get user data from premiumize.me status = self.get_account_status(user, password) self.log_debug(status) @@ -36,7 +36,7 @@ class PremiumizeMe(Account): #: Check if user and password are valid if status['status'] != 200: - self.login_fail() + self.fail_login() def get_account_status(self, user, password): diff --git a/module/plugins/accounts/QuickshareCz.py b/module/plugins/accounts/QuickshareCz.py index 42022ec82..886e7472e 100644 --- a/module/plugins/accounts/QuickshareCz.py +++ b/module/plugins/accounts/QuickshareCz.py @@ -19,7 +19,7 @@ class QuickshareCz(Account): TRAFFIC_LEFT_PATTERN = r'Stav kreditu: <strong>(.+?)</strong>' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load("http://www.quickshare.cz/premium") m = re.search(self.TRAFFIC_LEFT_PATTERN, html) @@ -40,4 +40,4 @@ class QuickshareCz(Account): 'jmeno': user}) if u'>Takový uživatel neexistuje.<' in html or u'>Špatné heslo.<' in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/RPNetBiz.py b/module/plugins/accounts/RPNetBiz.py index d713cedca..5c8c788b8 100644 --- a/module/plugins/accounts/RPNetBiz.py +++ b/module/plugins/accounts/RPNetBiz.py @@ -15,7 +15,7 @@ class RPNetBiz(Account): __authors__ = [("Dman", "dmanugm@gmail.com")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): #: Get account information from rpnet.biz res = self.get_account_status(user, password, req) try: @@ -39,7 +39,7 @@ class RPNetBiz(Account): #: If we have an error in the res, we have wrong login information if 'error' in res: - self.login_fail() + self.fail_login() def get_account_status(self, user, password, req): diff --git a/module/plugins/accounts/RapideoPl.py b/module/plugins/accounts/RapideoPl.py index e9a483927..f7c6a4af3 100644 --- a/module/plugins/accounts/RapideoPl.py +++ b/module/plugins/accounts/RapideoPl.py @@ -32,7 +32,7 @@ class RapideoPl(Account): _pwd = None - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): self._req = req try: result = json_loads(self.run_auth_query()) @@ -62,10 +62,10 @@ class RapideoPl(Account): try: response = json_loads(self.run_auth_query()) except Exception: - self.login_fail() + self.fail_login() if "errno" in response.keys(): - self.login_fail() + self.fail_login() data['usr'] = self._usr data['pwd'] = self._pwd diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py index 2fc266722..6aa95a9b6 100644 --- a/module/plugins/accounts/RapidgatorNet.py +++ b/module/plugins/accounts/RapidgatorNet.py @@ -20,7 +20,7 @@ class RapidgatorNet(Account): API_URL = "http://rapidgator.net/api/user/" - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): validuntil = None trafficleft = None premium = False @@ -75,4 +75,4 @@ class RapidgatorNet(Account): except Exception, e: self.log_error(e) - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/RapiduNet.py b/module/plugins/accounts/RapiduNet.py index 2033d377f..21ccb0908 100644 --- a/module/plugins/accounts/RapiduNet.py +++ b/module/plugins/accounts/RapiduNet.py @@ -26,7 +26,7 @@ class RapiduNet(Account): TRAFFIC_LEFT_PATTERN = r'class="tipsyS"><b>(.+?)<' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): validuntil = None trafficleft = -1 premium = False @@ -63,4 +63,4 @@ class RapiduNet(Account): self.log_debug(json) if json['message'] != "success": - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/RealdebridCom.py b/module/plugins/accounts/RealdebridCom.py index 718850c1a..f10a257d1 100644 --- a/module/plugins/accounts/RealdebridCom.py +++ b/module/plugins/accounts/RealdebridCom.py @@ -16,7 +16,7 @@ class RealdebridCom(Account): __authors__ = [("Devirex Hazzard", "naibaf_11@yahoo.de")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): if self.pin_code: return @@ -38,7 +38,7 @@ class RealdebridCom(Account): 'pass': password}) if "Your login informations are incorrect" in html: - self.login_fail() + self.fail_login() 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 36e5e33eb..2c2c7a712 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -14,7 +14,7 @@ class RehostTo(Account): __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): premium = False trafficleft = None validuntil = -1 @@ -55,4 +55,4 @@ class RehostTo(Account): if "ERROR" in html: self.log_debug(html) - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py index 87bbc4632..b818fb4e6 100644 --- a/module/plugins/accounts/ShareonlineBiz.py +++ b/module/plugins/accounts/ShareonlineBiz.py @@ -30,15 +30,15 @@ class ShareonlineBiz(Account): api = dict(line.split("=") for line in res.splitlines() if "=" in line) if not 'a' in api: - self.login_fail(res.strip('*').strip()) + self.fail_login(res.strip('*').strip()) if api['a'].lower() == "not_available": - self.login_fail(_("No info available")) + self.fail_login(_("No info available")) return api - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): premium = False validuntil = None trafficleft = -1 diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py index a5c69f51c..b92180936 100644 --- a/module/plugins/accounts/SimplyPremiumCom.py +++ b/module/plugins/accounts/SimplyPremiumCom.py @@ -16,7 +16,7 @@ class SimplyPremiumCom(Account): __authors__ = [("EvolutionClip", "evolutionclip@live.de")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): premium = False validuntil = -1 trafficleft = None @@ -46,4 +46,4 @@ class SimplyPremiumCom(Account): post={'key': user} if not password else {'login_name': user, 'login_pass': password}) if 'logout' not in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index 84c38227e..c2f5f380a 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -16,7 +16,7 @@ class SimplydebridCom(Account): __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): res = self.load("http://simply-debrid.com/api.php", get={'login': 2, 'u' : user, @@ -34,4 +34,4 @@ class SimplydebridCom(Account): 'u' : user, 'p' : password}) if res != "02: loggin success": - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py index 9c2451794..6ac1e9744 100644 --- a/module/plugins/accounts/SmoozedCom.py +++ b/module/plugins/accounts/SmoozedCom.py @@ -34,7 +34,7 @@ class SmoozedCom(Account): __authors__ = [("", "")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): status = self.get_account_status(user, password, req) self.log_debug(status) @@ -67,7 +67,7 @@ class SmoozedCom(Account): #: Check if user and password are valid if status['state'] != 'ok': - self.login_fail() + self.fail_login() def get_account_status(self, user, password, req): diff --git a/module/plugins/accounts/TurbobitNet.py b/module/plugins/accounts/TurbobitNet.py index 206e7874f..426e3660b 100644 --- a/module/plugins/accounts/TurbobitNet.py +++ b/module/plugins/accounts/TurbobitNet.py @@ -18,7 +18,7 @@ class TurbobitNet(Account): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load("http://turbobit.net") m = re.search(r'<u>Turbo Access</u> to ([\d.]+)', html) @@ -41,4 +41,4 @@ class TurbobitNet(Account): "user[submit]": "Login"}) if not '<div class="menu-item user-name">' in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/UlozTo.py b/module/plugins/accounts/UlozTo.py index 00e125dbc..fdf56dbc3 100644 --- a/module/plugins/accounts/UlozTo.py +++ b/module/plugins/accounts/UlozTo.py @@ -21,7 +21,7 @@ class UlozTo(Account): TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a .*?title=".+?GB = ([\d.]+) MB"' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load("http://www.ulozto.net/") m = re.search(self.TRAFFIC_LEFT_PATTERN, html) @@ -46,4 +46,4 @@ class UlozTo(Account): 'remember': "on"}) if '<div class="flash error">' in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/UploadableCh.py b/module/plugins/accounts/UploadableCh.py index 9c2649e51..e5b96a343 100644 --- a/module/plugins/accounts/UploadableCh.py +++ b/module/plugins/accounts/UploadableCh.py @@ -14,7 +14,7 @@ class UploadableCh(Account): __authors__ = [("Sasch", "gsasch@gmail.com")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load("http://www.uploadable.ch/login.php") premium = '<a href="/logout.php"' in html @@ -31,4 +31,4 @@ class UploadableCh(Account): 'action__login': "normalLogin"}) if "Login failed" in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py index 59d3fcff9..12b141c57 100644 --- a/module/plugins/accounts/UploadedTo.py +++ b/module/plugins/accounts/UploadedTo.py @@ -24,7 +24,7 @@ class UploadedTo(Account): TRAFFIC_LEFT_PATTERN = r'<b class="cB">(?P<S>[\d.,]+) (?P<U>[\w^_]+)' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): validuntil = None trafficleft = None premium = None @@ -72,4 +72,4 @@ class UploadedTo(Account): m = re.search(r'"err":"(.+?)"', html) if m is not None: - self.login_fail(m.group(1)) + self.fail_login(m.group(1)) diff --git a/module/plugins/accounts/UploadheroCom.py b/module/plugins/accounts/UploadheroCom.py index f31b01d03..3d3353dbc 100644 --- a/module/plugins/accounts/UploadheroCom.py +++ b/module/plugins/accounts/UploadheroCom.py @@ -18,7 +18,7 @@ class UploadheroCom(Account): __authors__ = [("mcmyst", "mcmyst@hotmail.fr")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): premium_pattern = re.compile('Il vous reste <span class="bleu">(\d+)</span> jours premium') data = self.get_data(user) @@ -40,4 +40,4 @@ class UploadheroCom(Account): 'password_login': password}) if "mot de passe invalide" in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/UploadingCom.py b/module/plugins/accounts/UploadingCom.py index d269abde7..f81c50537 100644 --- a/module/plugins/accounts/UploadingCom.py +++ b/module/plugins/accounts/UploadingCom.py @@ -22,7 +22,7 @@ class UploadingCom(Account): VALID_UNTIL_PATTERN = r'Valid Until:(.+?)<' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): validuntil = None trafficleft = None premium = None diff --git a/module/plugins/accounts/UptoboxCom.py b/module/plugins/accounts/UptoboxCom.py index 7cc217823..54d733375 100644 --- a/module/plugins/accounts/UptoboxCom.py +++ b/module/plugins/accounts/UptoboxCom.py @@ -4,16 +4,16 @@ from module.plugins.internal.XFSAccount import XFSAccount class UptoboxCom(XFSAccount): - __name__ = "UptoboxCom" - __type__ = "account" - __version__ = "0.12" - __status__ = "testing" + __name__ = "UptoboxCom" + __type__ = "account" + __version__ = "0.12" + __status__ = "testing" - __description__ = """Uptobox.com account plugin""" - __license__ = "GPLv3" - __authors__ = [("benbox69", "dev@tollet.me")] + __description__ = """Uptobox.com account plugin""" + __license__ = "GPLv3" + __authors__ = [("benbox69", "dev@tollet.me")] - HOSTER_DOMAIN = "uptobox.com" - HOSTER_URL = "https://uptobox.com/" - LOGIN_URL = "https://login.uptobox.com/logarithme/" + HOSTER_DOMAIN = "uptobox.com" + HOSTER_URL = "https://uptobox.com/" + LOGIN_URL = "https://login.uptobox.com/logarithme/" diff --git a/module/plugins/accounts/WebshareCz.py b/module/plugins/accounts/WebshareCz.py index bbfb90a92..f35300f52 100644 --- a/module/plugins/accounts/WebshareCz.py +++ b/module/plugins/accounts/WebshareCz.py @@ -25,7 +25,7 @@ class WebshareCz(Account): TRAFFIC_LEFT_PATTERN = r'<bytes>(.+)</bytes>' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load("https://webshare.cz/api/user_data/", post={'wst': self.get_data(user).get('wst', None)}) @@ -47,7 +47,7 @@ class WebshareCz(Account): 'wst' : ""}) if "<status>OK</status>" not in salt: - self.login_fail() + self.fail_login() 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.login_fail() + self.fail_login() data['wst'] = re.search('<token>(.+)</token>', login).group(1) diff --git a/module/plugins/accounts/YibaishiwuCom.py b/module/plugins/accounts/YibaishiwuCom.py index c5dda0921..48c7b65bd 100644 --- a/module/plugins/accounts/YibaishiwuCom.py +++ b/module/plugins/accounts/YibaishiwuCom.py @@ -19,7 +19,7 @@ class YibaishiwuCom(Account): ACCOUNT_INFO_PATTERN = r'var USER_PERMISSION = {(.*?)}' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): # self.relogin(user) html = self.load("http://115.com/") @@ -37,4 +37,4 @@ class YibaishiwuCom(Account): "login[passwd]" : password}) if not 'var USER_PERMISSION = {' in html: - self.login_fail() + self.fail_login() diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index 4138ba3cc..2b41fb343 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -33,7 +33,7 @@ class ZeveraCom(Account): self.API_URL = "http://api.%s/jDownloader.ashx" % (self.HOSTER_DOMAIN or "") - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): validuntil = None trafficleft = None premium = False @@ -53,7 +53,7 @@ class ZeveraCom(Account): self.password = password if self.api_response(req) == "No trafic": - self.login_fail() + self.fail_login() def api_response(self, req, just_header=False, **kwargs): diff --git a/module/plugins/internal/Account.py b/module/plugins/internal/Account.py index 2713e8da4..07a4a2f81 100644 --- a/module/plugins/internal/Account.py +++ b/module/plugins/internal/Account.py @@ -190,7 +190,7 @@ class Account(Plugin): def get_info(self, user, reload=False): """ Retrieve account infos for an user, do **not** overwrite this method!\\ - just use it to retrieve infos in hoster plugins. see `parse_info` + just use it to retrieve infos in hoster plugins. see `grab_info` :param user: username :param reload: reloads cached account information @@ -235,7 +235,7 @@ class Account(Plugin): try: self.req = self.get_request(user) - extra_info = self.parse_info(user, info['login']['password'], info, self.req) + extra_info = self.grab_info(user, info['login']['password'], info, self.req) if extra_info and isinstance(extra_info, dict): info['data'].update(extra_info) @@ -253,7 +253,7 @@ class Account(Plugin): return info - def parse_info(self, user, password, info, req): + def grab_info(self, user, password, info, req): """ This should be overwritten in account plugin and retrieving account information for user @@ -270,8 +270,8 @@ class Account(Plugin): return [self.getAccountData(user, *args, **kwargs) for user, info in self.info.items()] - def login_fail(self, reason=_("Login handshake has failed")): - return self.fail(reason) + def fail_login(self, msg=_("Login handshake has failed")): + return self.fail(msg) def get_request(self, user=None): diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py index 3f2158a0b..bef8fc828 100644 --- a/module/plugins/internal/XFSAccount.py +++ b/module/plugins/internal/XFSAccount.py @@ -40,7 +40,7 @@ class XFSAccount(Account): LOGIN_FAIL_PATTERN = r'Incorrect Login or Password|account was banned|Error<' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): validuntil = None trafficleft = None leechtraffic = None @@ -151,7 +151,7 @@ class XFSAccount(Account): set_cookie(self.req.cj, self.HOSTER_DOMAIN, "lang", "english") if not self.HOSTER_URL: - self.login_fail(_("Missing HOSTER_URL")) + self.fail_login(_("Missing HOSTER_URL")) else: self.HOSTER_URL = self.HOSTER_URL.rstrip('/') + "/" @@ -180,8 +180,8 @@ class XFSAccount(Account): except ValueError: if re.search(self.LOGIN_FAIL_PATTERN, html): - self.login_fail() + self.fail_login() else: if not 'success' in json or not json['success']: - self.login_fail() + self.fail_login() |