From ba7ac0fbb1994b95a9b5b96f3db92bd2881dc2eb Mon Sep 17 00:00:00 2001 From: Ritesh Date: Tue, 3 Sep 2024 12:45:06 +0530 Subject: [PATCH] handled already logined case --- src/linkedIn_authenticator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/linkedIn_authenticator.py b/src/linkedIn_authenticator.py index c953e5a..5f30378 100644 --- a/src/linkedIn_authenticator.py +++ b/src/linkedIn_authenticator.py @@ -25,6 +25,9 @@ class LinkedInAuthenticator: def handle_login(self): print("Navigating to the LinkedIn login page...") self.driver.get("https://www.linkedin.com/login") + if 'feed' in self.driver.current_url: + print("User is already logged in.") + return try: self.enter_credentials() self.submit_login_form()