mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 02:31:45 +01:00
Fix login check
This commit is contained in:
@@ -348,13 +348,16 @@ class KleinanzeigenBot(SeleniumMixin):
|
||||
self.browser_config.profile_name = self.config["browser"]["profile_name"]
|
||||
|
||||
def login(self) -> None:
|
||||
LOG.info("Logging in as [%s]...", self.config["login"]["username"])
|
||||
self.web_open(f"{self.root_url}/m-einloggen.html?targetUrl=/")
|
||||
LOG.info("Checking if already logged in")
|
||||
self.web_open(f"{self.root_url}")
|
||||
|
||||
if self.is_logged_in():
|
||||
LOG.info("Already logged in as [%s]. Skipping login.", self.config["login"]["username"])
|
||||
return
|
||||
|
||||
LOG.info("Logging in as [%s]...", self.config["login"]["username"])
|
||||
self.web_open(f"{self.root_url}/m-einloggen.html?targetUrl=/")
|
||||
|
||||
# close redesign banner
|
||||
try:
|
||||
self.web_click(By.XPATH, '//*[@id="pre-launch-comms-interstitial-frontend"]//button[.//*[text()[contains(.,"nicht mehr anzeigen")]]]')
|
||||
|
||||
Reference in New Issue
Block a user