mirror of
https://github.com/WorldObservationLog/AppleMusicDecrypt.git
synced 2026-01-15 14:22:54 -03:00
Fix: Update API endpoint and regex for token retrieval
Some checks failed
/ Build Windows (push) Has been cancelled
Some checks failed
/ Build Windows (push) Has been cancelled
This commit is contained in:
@@ -63,9 +63,9 @@ class WebAPI:
|
|||||||
stop=stop_after_attempt(32))
|
stop=stop_after_attempt(32))
|
||||||
def _set_token(self):
|
def _set_token(self):
|
||||||
with httpx.Client() as client:
|
with httpx.Client() as client:
|
||||||
resp = client.get("https://beta.music.apple.com", follow_redirects=True)
|
resp = client.get("https://music.apple.com", follow_redirects=True)
|
||||||
index_js_uri = regex.findall(r"/assets/index-legacy-[^/]+\.js", resp.text)[0]
|
index_js_uri = regex.findall(r"/assets/index~[^/]+\.js", resp.text)[0]
|
||||||
js_resp = client.get("https://beta.music.apple.com" + index_js_uri)
|
js_resp = client.get("https://music.apple.com" + index_js_uri)
|
||||||
self.token = regex.search(r'eyJh([^"]*)', js_resp.text)[0]
|
self.token = regex.search(r'eyJh([^"]*)', js_resp.text)[0]
|
||||||
|
|
||||||
# DO NOT REMOVE IT
|
# DO NOT REMOVE IT
|
||||||
|
|||||||
Reference in New Issue
Block a user