Fix (?) logged_in property.

Leonardo Barcaroli 2019-02-16 19:51:51 +01:00
parent 83b91cca78
commit a9e9728842
1 changed files with 4 additions and 3 deletions

View File

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