# -*- coding: utf-8 -*- 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.10" __status__ = "testing" __description__ = """Euroshare.eu account plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz" ), ("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")] def grab_info(self, user, password, data): html = self.load("http://euroshare.eu/", get={'lang': "en"}) m = re.search(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()