Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ws_api/wealthsimple_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def start_session(self, sess: WSAPISession | None = None):
for line in response.splitlines():
# Look for wssdi in set-cookie headers
if not self.session.wssdi and "set-cookie:" in line.lower():
match = re.search(r"wssdi=([a-f0-9]+);", line, re.IGNORECASE)
match = re.search(r"wssdi=([a-f0-9-]+);", line, re.IGNORECASE)
if match:
self.session.wssdi = match.group(1)

Expand All @@ -149,7 +149,7 @@ def start_session(self, sess: WSAPISession | None = None):

# Look for clientId in the app JS file
match = re.search(
r'production:.*clientId:"([a-f0-9]+)"', response, re.IGNORECASE
r'production.*clientId:"([a-f0-9]+)"', response, re.IGNORECASE
)
if match:
self.session.client_id = match.group(1)
Expand Down