fix: look for 303s on successful form submissions
This commit is contained in:
parent
131e6ac8ca
commit
c868552e41
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ class HTMLClient:
|
|||
|
||||
def get_csrf_token(self, url: str) -> str:
|
||||
resp = self.session.get(url, allow_redirects=False)
|
||||
if resp.status_code != 200 and resp.status_code != 302:
|
||||
if resp.status_code != 200 and resp.status_code != 302 and resp.status_code != 303:
|
||||
print(resp.status_code, resp.text)
|
||||
raise Exception(f"Can't get csrf token: {resp.status_code}")
|
||||
csrf = self.__get_csrf_token(resp.text)
|
||||
|
|
Loading…
Reference in a new issue