Skip to content

Commit

Permalink
Support new browser-based Qobuz login page
Browse files Browse the repository at this point in the history
  • Loading branch information
bbye98 committed May 18, 2024
1 parent c21f491 commit eba6a8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/minim/qobuz.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,14 +359,14 @@ def set_auth_token(

with open(har_file, "r") as f:
regex = re.search(
'"X-User-Auth-Token", "value": "(.*?)"',
'(?<=")https://www.qobuz.com/api.json/0.2/oauth/callback?(.*)(?=")',
f.read()
)
har_file.unlink()

if regex is None:
raise RuntimeError("Authentication failed.")
auth_token = regex.group(1)
auth_token = self._request("get", regex.group(0)).json()["token"]
else:
emsg = ("No account email or password provided "
"for the password flow.")
Expand Down

0 comments on commit eba6a8a

Please sign in to comment.