mirror of
https://github.com/zhaarey/apple-music-alac-atmos-downloader.git
synced 2026-01-15 14:22:53 -03:00
Fix token extraction due to Apple Music website structure change
This commit is contained in:
@@ -23,7 +23,7 @@ func GetToken() (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
regex := regexp.MustCompile(`/assets/index-legacy-[^/]+\.js`)
|
||||
regex := regexp.MustCompile(`/assets/index-legacy~[^"'\s]+\.js`)
|
||||
indexJsUri := regex.FindString(string(body))
|
||||
|
||||
req, err = http.NewRequest("GET", "https://beta.music.apple.com"+indexJsUri, nil)
|
||||
@@ -47,3 +47,4 @@ func GetToken() (string, error) {
|
||||
|
||||
return token, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user