Skip to content
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

[netease] Get netease music download url through player api #31235

Merged
merged 8 commits into from
Oct 11, 2022

Conversation

xyb
Copy link
Contributor

@xyb xyb commented Sep 14, 2022

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

Netease music downloading was broken for a long time, based on @TianyiShi2001's research #18051 (comment), I finally get the download url through player api and fixed it.

fixes #11216
fixes #11365
fixes #18051

Copy link
Contributor

@dirkf dirkf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work, especially the new crypto fn!

I've made a few suggestions. Have a look at them and then it should be ready to go (already passing CI tests).

youtube_dl/extractor/neteasemusic.py Outdated Show resolved Hide resolved
youtube_dl/extractor/neteasemusic.py Outdated Show resolved Hide resolved
youtube_dl/extractor/neteasemusic.py Outdated Show resolved Hide resolved
youtube_dl/extractor/neteasemusic.py Outdated Show resolved Hide resolved
youtube_dl/extractor/neteasemusic.py Outdated Show resolved Hide resolved
youtube_dl/extractor/neteasemusic.py Outdated Show resolved Hide resolved
youtube_dl/extractor/neteasemusic.py Outdated Show resolved Hide resolved
youtube_dl/extractor/neteasemusic.py Outdated Show resolved Hide resolved
youtube_dl/extractor/neteasemusic.py Outdated Show resolved Hide resolved
youtube_dl/extractor/neteasemusic.py Outdated Show resolved Hide resolved
@xyb
Copy link
Contributor Author

xyb commented Oct 10, 2022

@dirkf Thanks for your excellent advises, all fixed

@xyb xyb requested a review from dirkf October 10, 2022 15:46
Copy link
Contributor

@dirkf dirkf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dirkf dirkf merged commit c91cbf6 into ytdl-org:master Oct 11, 2022
@xyb xyb deleted the neteasemusic-fix branch October 11, 2022 13:13
github-actions bot added a commit to hellopony/youtube-dl that referenced this pull request Oct 11, 2022
* https://github.com/ytdl-org/youtube-dl:
  [netease] Get netease music download url through player api (ytdl-org#31235)
  [Common:JWPlayer] Fix x1000 scaling error
  [utils] Sanitize look-alike Unicode glyphs in non-ID filename fields when --restrict-filenames
  [JSInterp] Improve separation logic
  [ZDF] Overhaul ZDF extractors * pull some yt-dlp changes into ZDFBaseIE._extract_format() * add test cases from yt-dlp to ZDFIE * fix crash in ZDFIE._extract_mobile() when object had no `formitaeten` * improve title extraction in ZDFChannelIE (remove trailing station ident) * avoid extracting non-video playlist items (fixes ytdl-org#31149)
  [test] Implement string "lambda x: condition(x)" as an expected value
  [motherless] Fixed the broken uploader_id in the extractor (ytdl-org#31243)
alxlive pushed a commit to alxlive/youtube-dl that referenced this pull request Feb 27, 2023
…#31235)

* remove unplayable song from test
* compatible with python 2
* using standard User_Agent, fix imports
* use hash instead of long description
* fix lint
* fix hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants