From 89cff95f0bd767f05b884e3ad9854ede80d7466b Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Tue, 3 Jan 2023 21:03:26 +0100 Subject: [PATCH] Fix #2 --- lidlplus/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lidlplus/api.py b/lidlplus/api.py index 4733d8f..ba605b8 100644 --- a/lidlplus/api.py +++ b/lidlplus/api.py @@ -139,12 +139,12 @@ def _register_link(self): "Country": self._country, "language": f"{self._language}-{self._country}", } - params = "&".join([f"{key}={value}" for key, value in args]) + params = "&".join([f"{key}={value}" for key, value in args.items()]) return f"{self._register_oauth_client()}&{params}" def login(self, phone, password, verify_token_func, **kwargs): """Simulate app auth""" - if verify_mode := kwargs.get("verify_mode", "phone") not in ["phone", "email"]: + if (verify_mode := kwargs.get("verify_mode", "phone")) not in ["phone", "email"]: raise ValueError('Only "phone" or "email" supported') browser = self._get_browser(headless=kwargs.get("headless", True)) browser.get(self._register_link)