fix: store csrf_token in cookies dict
This commit is contained in:
parent
2225ffea01
commit
ed86ad63b1
@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 18,
|
||||
"execution_count": 20,
|
||||
"id": "f28552f1-618c-4853-92e2-566554a2de2c",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
@ -12,7 +12,7 @@
|
||||
"True"
|
||||
]
|
||||
},
|
||||
"execution_count": 18,
|
||||
"execution_count": 20,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@ -28,7 +28,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 19,
|
||||
"execution_count": 21,
|
||||
"id": "953d142e-a575-41b7-927d-8cd1546d2747",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
|
||||
Binary file not shown.
@ -292,7 +292,7 @@ class KworkClient:
|
||||
# Get CSRF token from response for API requests
|
||||
csrf_token = response_data.get("csrftoken") or cookies.get("csrf_user_token")
|
||||
if csrf_token:
|
||||
self._cookies["csrftoken"] = csrf_token
|
||||
cookies["csrftoken"] = csrf_token
|
||||
|
||||
# Create new client with token
|
||||
return cls(token=web_token, cookies=cookies, timeout=timeout)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user