INNER CODE UNIT · Python
saveCookies
wodsuz/EasyApplyJobsBot · linkedin.py:89
def saveCookies(self) -> None:
try:
# Get the directory path for cookies
cookies_dir = os.path.dirname(self.cookies_path)
# Create cookies directory if it doesn't exist
if cookies_dir and not os.path.exists(cookies_dir):
os.makedirs(cookies_dir, exist_ok=True)
# Save cookies to file
with open(self.cookies_path, "wb") as f:
pickle.dump(self.driver.get_cookies(), f)
except Exception as e:
if config.displayWarnings:
utils.prYellow(f"⚠️ Warning: Could not save cookies: {str(e)[0:100]}")
# Don't raise the exception - cookie saving is not critical for bot operation
def isLoggedIn(self) -> bool: