Skip to main content

网易云音乐API NeteaseCloudMusicApi项目的 Python SDK

Project description

NeteaseCloudMusic_PythonSDK

基于 NeteaseCloudMusicApi 封装的 Python SDK。 网易云API Python版本。 现已同步原项目接口且测试通过的有200多个 已发布到PyPi,可直接使用pip安装 项目地址:GitHub

License

依赖于

原理

  • 通过 py_mini_racer 调用 NeteaseCloudMusicApi_V8js 方法。进一步进行了简单封装。

使用

  • 安装 pip install NeteaseCloudMusic
  • 导入API进行使用(具体查看test.py中的示例)
from NeteaseCloudMusic import NeteaseCloudMusicApi, api_help, api_list
import os

netease_cloud_music_api = NeteaseCloudMusicApi()  # 初始化API
netease_cloud_music_api.cookie = os.getenv("COOKIE")  # 设置cookie
response = netease_cloud_music_api.request("song_url_v1", {"id": 33894312, "level": "exhigh"})  # 调用API

# 获取帮助
print(api_help())
print(api_help('song_url_v1'))
# 获取API列表
print(api_list())

注意: request(self, name, query=None) 的第一个参数为API名称,第二个参数为API参数,具体API名称和参数请参考 NeteaseCloudMusicApi文档,name支持/song/url/v1song_url_v1两种写法。

开发

  • 克隆项目 git clone git@github.com:2061360308/NeteaseCloudMusic_PythonSDK.git
  • 安装依赖 pip install -r requirements.txt
  • 目录/文件说明 ├── package 项目包根目录 ├── test_gender 生成测试代码的脚本 ├── test.py 手动测试/ 使用示例

改进

下列API未支持

  • apicache.js
  • memory-cache.js
  • request_reference.js
  • avatar_upload.js
  • cloud.js
  • playlist_cover_update.js
  • voice_upload.js
  • register_anonimous.js
  • verify_getQr.js

以下api未测试(这些接口测试起来比较繁琐)

  • /user/replacephone
  • /audio/match
  • /rebind
  • /nickname/check
  • /activate/init/profile
  • /cellphone/existence/check
  • /register/cellphone
  • /captcha/verify
  • /captcha/sent
  • /login/refresh
  • /logout
  • /user/update
  • /pl/count
  • /playlist/update
  • /playlist/desc/update
  • /playlist/name/update
  • /playlist/tags/update
  • /event/forward
  • /event/del
  • /share/resource
  • /send/text
  • /send/playlist
  • /playlist/create
  • /playlist/tracks
  • /daily_signin
  • /fm_trash

欢迎提交PR

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

NeteaseCloudMusicApi-0.1.1.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

NeteaseCloudMusicApi-0.1.1-py2.py3-none-any.whl (1.3 MB view details)

Uploaded Python 2Python 3

File details

Details for the file NeteaseCloudMusicApi-0.1.1.tar.gz.

File metadata

  • Download URL: NeteaseCloudMusicApi-0.1.1.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for NeteaseCloudMusicApi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9697de96851a32942c9028b832097fff2bb09316153fb706079848660782d5a3
MD5 192dc2a962eb200c7ae5324f6e6fffc6
BLAKE2b-256 eebdc42e75dacfdbc349497699722f23188f5bd0a67c38ac17338e04208531fc

See more details on using hashes here.

File details

Details for the file NeteaseCloudMusicApi-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for NeteaseCloudMusicApi-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2a25d13fa62e96fdc5f20013be065daaa8a641cfaa3fcba6b37f583fe05f9271
MD5 8b0daa264cf9e30dc5d8459fd8c3d9a9
BLAKE2b-256 46335326c70af97a0bd4aeb4d864b2dffa3aef36ea758c129cc94adb740e0e4d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page