From acdb461f9a767af167a8c9218220276586f91994 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Sun, 1 May 2016 13:42:20 +0300 Subject: [EuroshareEu] Fix #2446 --- module/plugins/accounts/EuroshareEu.py | 36 ++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/module/plugins/accounts/EuroshareEu.py b/module/plugins/accounts/EuroshareEu.py index b1528c6dc..5e6debe8e 100644 --- a/module/plugins/accounts/EuroshareEu.py +++ b/module/plugins/accounts/EuroshareEu.py @@ -2,40 +2,56 @@ import re import time +import urlparse from module.plugins.internal.Account import Account +from module.plugins.internal.misc import parse_html_form class EuroshareEu(Account): __name__ = "EuroshareEu" __type__ = "account" - __version__ = "0.09" + __version__ = "0.10" __status__ = "testing" __description__ = """Euroshare.eu account plugin""" __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + __authors__ = [("zoidberg", "zoidberg@mujmail.cz" ), + ("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")] def grab_info(self, user, password, data): - html = self.load("http://euroshare.eu/customer-zone/settings/") + html = self.load("http://euroshare.eu/", + get={'lang': "en"}) - m = re.search('id="input_expire_date" value="(\d+\.\d+\.\d+ \d+:\d+)"', html) + m = re.search(r'Nesprávne prihlasovacie meno alebo heslo" in html: + if r'
  • ' in html: + self.skip_login() + + action, inputs = parse_html_form('id="frm-prihlaseni"', html) + if not inputs: + self.fail_login(_("Login form not found")) + + inputs['username'] = user + inputs['password'] = password + + html = self.load(urlparse.urljoin(login_url, action), + post=inputs) + + if r'
  • ' not in html: self.fail_login() -- cgit v1.2.3