-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
neteasemusic 3.0.6.2300 #197463
neteasemusic 3.0.6.2300 #197463
Conversation
The upstream download page (https://music.163.com/#/download) uses a POST request to fetch download link information but livecheck doesn't support POST requests yet. Additionally, the request parameters are encrypted in a particular way (see https://github.com/orgs/Homebrew/discussions/5756). That said, the API endpoint appears to work with a simple `GET` request, so this adds a `livecheck` block using the JSON strategy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rebased this and pushed a commit with a working livecheck
block.
As mentioned, the upstream download page (https://music.163.com/#/download) uses a POST request to fetch download link information but livecheck doesn't support POST requests yet. Additionally, the request parameters are encrypted in a particular way (see https://github.com/orgs/Homebrew/discussions/5756, https://github.com/zousandian/NeteaseCloudMusicApi/wiki/网易云音乐API分析---weapi). However, the same API endpoint appears to work with a simple GET
request, so I've added a livecheck
block that uses the JSON
strategy to extract the version from the macOS download URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's hoping that this livecheck
block holds up over time and we don't have to do anything more complicated. Thanks, @niu541412!
For what it's worth, livecheck will support POST
requests sometime in the future. It relies on another feature that I've implemented but I'm having to refactor some parts of brew (for the sake of type checking) before I can create a PR for that work, so I'm a few PRs away from POST
support.
Netease music V3 has been flagged as the stable version on its homepage and AppStore page. But it changed to
use a POST method to fetch its download link. See https://github.com/orgs/Homebrew/discussions/5756.
Important: Do not tick a checkbox if you haven’t performed its action. Honesty is indispensable for a smooth review process.
In the following questions
<cask>
is the token of the cask you're submitting.After making any changes to a cask, existing or new, verify:
brew audit --cask --online <cask>
is error-free.brew style --fix <cask>
reports no offenses.Additionally, if adding a new cask:
brew audit --cask --new <cask>
worked successfully.HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <cask>
worked successfully.brew uninstall --cask <cask>
worked successfully.