Fix (?) logged_in property.

This commit is contained in:
sfigato 2019-02-16 19:51:51 +01:00 committed by blallo
parent 5707698b66
commit 32a87d7b6d
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F

View File

@ -238,9 +238,10 @@ class Operator(wd.Firefox):
"""
_base_domain = ".".join(self.uri.netloc.split(".")[-2:])
cookies = [c["name"] for c in self.get_cookies() if _base_domain in c["domain"]]
_right_url = "/jsp/home.jsp" in self.current_url
_cookies = "dtLatC" in cookies
return _right_url and _cookies
self.logger.debug("Cookies: %s", cookies)
# _right_url = "/jsp/home.jsp" in self.current_url
_cookies = all(c in cookies for c in ("spcookie", "JSESSIONID", "ipclientid"))
return _cookies
@property
def checked_in(self) -> bool: