feat: init woodpecker #1
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ class HTMLClient:
|
||||||
|
|
||||||
def get_csrf_token(self, url: str) -> str:
|
def get_csrf_token(self, url: str) -> str:
|
||||||
resp = self.session.get(url, allow_redirects=False)
|
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)
|
print(resp.status_code, resp.text)
|
||||||
raise Exception(f"Can't get csrf token: {resp.status_code}")
|
raise Exception(f"Can't get csrf token: {resp.status_code}")
|
||||||
csrf = self.__get_csrf_token(resp.text)
|
csrf = self.__get_csrf_token(resp.text)
|
||||||
|
|
Loading…
Reference in a new issue