ooii / pySuez

Get your water consumption data from your Suez account (www.toutsurmoneau.fr)
Apache License 2.0
8 stars 13 forks source link

Update token name and encoding (SUEZ change) #21

Open fazer666 opened 1 year ago

fazer666 commented 1 year ago

Feb 2023 : SUEZ changed token name and encoding. Changed regex accordingly

Kelesis commented 1 year ago

This might not work sometimes because the token itself can contains utf-8 escaped hyphen '-' for example. So the line to get the token should be: self._token = result.group(1).encode().decode('unicode_escape')

and before trying to read the result, it should be tested as different of None, and raise a PySuezError if not so, for the next time the token is being moved ^^'

laurent-martin commented 1 year ago

Note: in case this module is no more maintained, I have created this one:

https://github.com/laurent-martin/py-mon-eau

https://pypi.org/project/toutsurmoneau/