INNER CODE UNIT · Python
getHash
wodsuz/EasyApplyJobsBot · linkedin.py:78
def getHash(self, string: str) -> str:
return hashlib.md5(string.encode('utf-8')).hexdigest()
def loadCookies(self) -> None:
if os.path.exists(self.cookies_path):
with open(self.cookies_path, "rb") as f:
cookies = pickle.load(f)
self.driver.delete_all_cookies()
for cookie in cookies:
self.driver.add_cookie(cookie)
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):