Skip to content

Commit 0dfb697

Browse files
author
Christopher Munz-Michielin
committed
Fix regex matches to work with new login page
1 parent cd17d57 commit 0dfb697

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ws_api/wealthsimple_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def start_session(self, sess: WSAPISession | None = None):
122122
for line in response.splitlines():
123123
# Look for wssdi in set-cookie headers
124124
if not self.session.wssdi and "set-cookie:" in line.lower():
125-
match = re.search(r"wssdi=([a-f0-9]+);", line, re.IGNORECASE)
125+
match = re.search(r"wssdi=([a-f0-9-]+);", line, re.IGNORECASE)
126126
if match:
127127
self.session.wssdi = match.group(1)
128128

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

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

0 commit comments

Comments
 (0)