pylinky/client.py
def _post_login_page(self):
        """Login to enedis."""
        data = {
            'IDToken1': self.username,
            'IDToken2': self.password,
            'SunQueryParamsString': base64.b64encode(b'realm=particuliers'),
            'encoded': 'true',
            'gx_charset': 'UTF-8'
        }

        try:
            self._session.post(LOGIN_URL,
                               data=data,
                               allow_redirects=False,
                               timeout=self._timeout)
        except OSError:
            raise PyLinkyError("Can not submit login form")
        if 'iPlanetDirectoryPro' not in self._session.cookies:
            raise PyLinkyError("Login error: Please check your username/password.")
        return True
def _post_login_page(self):
        data = {
            'IDToken1': self.username,
            'IDToken2': self.password,
            'SunQueryParamsString': base64.b64encode(b'realm=particuliers'),
            'encoded': 'true',
            'gx_charset': 'UTF-8'
        }

        try:
            self._session.post(LOGIN_URL,
                               data=data,
                               allow_redirects=False,
                               timeout=self._timeout)
        except OSError:
            raise PyLinkyError("Can not submit login form")
        if 'iPlanetDirectoryPro' not in self._session.cookies:
            raise PyLinkyError("Login error: Please check your username/password.")
        return True
def _post_login_page ( self ) : data = { 'IDToken1' : self . username , 'IDToken2' : self . password , 'SunQueryParamsString' : base64 . b64encode ( b'realm=particuliers' ) , 'encoded' : 'true' , 'gx_charset' : 'UTF-8' } try : self . _session . post ( LOGIN_URL , data = data , allow_redirects = False , timeout = self . _timeout ) except OSError : raise PyLinkyError ( "Can not submit login form" ) if 'iPlanetDirectoryPro' not in self . _session . cookies : raise PyLinkyError ( "Login error: Please check your username/password." ) return True
Login to enedis.
Login to enedis .