Skip to content

Commit 37897b6

Browse files
authored
Update client.py
Update the regular expression value to extract csrf token value
1 parent c4563ac commit 37897b6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pysuez/client.py

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def _get_token(self):
5656
headers['Cookie'] += key + "=" + response.cookies[key]
5757

5858
phrase = re.compile('_csrf_token" value="(.*)"/>')
59+
phrase = re.compile('csrfToken\\\\u0022\\\\u003A\\\\u0022(.*)\\\\u0022,\\\\u0022targetUrl')
5960
result = phrase.search(response.content.decode('utf-8'))
6061
self._token = result.group(1)
6162
self._headers = headers

0 commit comments

Comments
 (0)