mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 10:31:50 +01:00
improve check if already logged in
This commit is contained in:
@@ -417,8 +417,8 @@ class KleinanzeigenBot(WebScrapingMixin):
|
|||||||
|
|
||||||
async def is_logged_in(self) -> bool:
|
async def is_logged_in(self) -> bool:
|
||||||
try:
|
try:
|
||||||
email = await self.web_text(By.ID, "user-email")
|
user_info = await self.web_text(By.ID, "user-email")
|
||||||
if f"angemeldet als: {self.config['login']['username']}" == email:
|
if self.config['login']['username'] in user_info:
|
||||||
return True
|
return True
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user