NeteaseCloudMusic APIs for Python 3.x 适用于 Python 3 的网易云音乐 API
Project description
PyNCM
安装
pip install pyncm
直接使用
API 可以通过命令行直接访问 python -m pyncm -h
命令行使用说明
配置
-
pyncm config
会将本次输入参数存储于~/.pyncm
python -m pyncm config [arguments]
- 存储的参数
--phone
--password
登录令牌;只会保存登录cookie--output
输出文件夹--clear-temp
自动清除下载临时文件--quality
下载质量--logging-level
日志过滤等级 - 优先级: 若在使用中设置了其他参数,命令行的参数会作为该会话的设置
- 存储的参数均已加密
- 存储的参数
使用
下载歌曲
pyncm song --id [歌曲 ID]
下载歌单
pyncm playlist --id [歌单 ID]
下载专辑
pyncm album --id [专辑 ID]
关于 ID
可通过网易云音乐的“分享链接”功能取得
如 https://music.163.com/playlist?id=3199245372&userid=315542615
,该ID即为3199245372
其他功能详见
Python 使用示例
from pyncm import apis
# 获取歌曲信息
apis.track.GetTrackAudio(29732235)
`{'data': [{'id': 29732235, 'url': 'http://m701.music.126.net/20200313090222/479f50d5748625d59d405c7a219f3f5b/jdyyaac/040f/565c ...`
# 获取歌曲详情
apis.track.GetTrackDetail(29732235)
`{'songs': [{'name': 'Supernova', 'id': 29732235, 'pst': 0, 't': 0, 'ar': [{'id': 38725, 'name': 'Laszlo', 'tns': [], ...`
# 获取歌曲评论
apis.track.GetTrackComments(29732235)
`{'isMusician': False, 'userId': -1, 'topComments': [], 'moreHot': True, 'hotComments': [{'user': {'locationInfo': None, 'liveIn ...`
详见 Wiki
Credit
Binaryify/NeteaseCloudMusicApi
衍生项目
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyncm-1.5.0.tar.gz
(31.4 kB
view details)
Built Distribution
pyncm-1.5.0-py3-none-any.whl
(75.1 kB
view details)
File details
Details for the file pyncm-1.5.0.tar.gz
.
File metadata
- Download URL: pyncm-1.5.0.tar.gz
- Upload date:
- Size: 31.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5be0fff95d19343737d490eff4ed2e18d1b428fb085484936637814a020b0d8 |
|
MD5 | b18dd338c994461acdd3dc2c595ee4d1 |
|
BLAKE2b-256 | d926e80ab31f706b0ea847ba9e9ac5eab16ecee10687363929d4c0a01620462b |
File details
Details for the file pyncm-1.5.0-py3-none-any.whl
.
File metadata
- Download URL: pyncm-1.5.0-py3-none-any.whl
- Upload date:
- Size: 75.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b66bf2d68bd2b922effdd3e5b2d4d536d3d02111d2eda9cf0cdcfb59a27fa36 |
|
MD5 | b4e00043559d8c7949034e6f8702bb96 |
|
BLAKE2b-256 | 643db69d1b39a18f77d111cda48c581aceb57e5dbaf62b65545e7296d3093dfa |