Skip to content

Commit

Permalink
Update client.py
Browse files Browse the repository at this point in the history
Update the regular expression value to extract csrf token value
  • Loading branch information
ooii authored Oct 30, 2023
1 parent c4563ac commit 37897b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pysuez/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def _get_token(self):
headers['Cookie'] += key + "=" + response.cookies[key]

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

0 comments on commit 37897b6

Please sign in to comment.