File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
88
99-
1010
11+ ## [0.9.1] - 2023-09-27
12+
13+ ## Bugfix
14+
15+ - Fix login issues on brazilian marketplace.
16+
1117## [0.9.0] - 2023-09-27
1218
1319## Bugfix
Original file line number Diff line number Diff line change @@ -487,12 +487,21 @@ def login(
487487
488488 session.close()
489489
490- if b"openid.oa2.authorization_code" not in login_resp.url.query:
490+ url = None
491+ if b"openid.oa2.authorization_code" in login_resp.url.query:
492+ url = login_resp.url
493+ elif len(login_resp.history) > 0:
494+ for history in login_resp.history:
495+ if b"openid.oa2.authorization_code" in history.url.query:
496+ url = history.url
497+ break
498+
499+ if url is None:
491500 raise Exception("Login failed. Please check the log.")
492501
493502 logger.debug("Login confirmed for %s", username)
494503
495- authorization_code = extract_code_from_url(login_resp. url)
504+ authorization_code = extract_code_from_url(url)
496505
497506 return {
498507 "authorization_code": authorization_code,
You can’t perform that action at this time.
0 commit comments