diff --git a/tyora/session.py b/tyora/session.py index 9d29bc7..dbd9533 100644 --- a/tyora/session.py +++ b/tyora/session.py @@ -82,11 +82,12 @@ def login(self, username: str, password: str) -> None: login_form["session[login]"] = username login_form["session[password]"] = password - _ = self.post( + res = self.post( url=urljoin(res.url, action), headers={"referer": res.url}, data=login_form, ) + res.raise_for_status() if not self.is_logged_in: logger.debug(