3 sha256 "a59b040076f9372123011f380ab3073e43aea26b1fb13783ba598e64f0af0a03"
5 url "https://d1.music.126.net/dmusic/NeteaseCloudMusic_Music_official_#{version}.dmg",
6 verified: "d1.music.126.net/",
8 name "NetEase cloud music"
10 desc "Music streaming platform"
11 homepage "https://music.163.com/"
13 # The upstream download page (https://music.163.com/#/download) uses a POST
14 # request to fetch download link information but livecheck doesn't support
15 # POST requests yet. Additionally, the request parameters are encrypted in a
16 # particular way (see https://github.com/orgs/Homebrew/discussions/5756).
17 # That said, the API endpoint appears to work with a simple `GET` request.
19 url "https://music.163.com/api/appcustomconfig/get"
20 regex(/NeteaseCloudMusic[._-]Music[._-]official[._-]v?(\d+(?:[._]\d+)+)/i)
21 strategy :json do |json, regex|
22 json.dig("data", "web-new-download", "osx", "downloadUrl")&.[](regex, 1)
27 depends_on macos: ">= :mojave"
29 app "NeteaseMusic.app"
31 uninstall quit: "com.netease.163music"
34 "~/Library/Application Support/com.netease.163music",
35 "~/Library/Caches/com.netease.163music",
36 "~/Library/Containers/com.netease.163music",
37 "~/Library/Cookies/com.netease.163music.binarycookies",
38 "~/Library/HTTPStorages/com.netease.163music",
39 "~/Library/Preferences/com.netease.163music.plist",
40 "~/Library/Saved Application State/com.netease.163music.savedState",
41 "~/Library/WebKit/com.netease.163music",