Skip to main content

NeteaseCloudMusic APIs for Python 3.x 适用于 Python 3 的网易云音乐 API

Project description

Logo

PyNCM

安装

pip install pyncm

推荐同时安装 (若不考虑使用CLI则可忽略)

  • mutagen : 为下载的音乐打上封面等
  • tqdm : 显示实时下载进度

使用

python -m pyncm -h

usage: __main__.py [-h] [--template 模板] [--quality 音质] [--output 输出] [--lyric-no 跳过歌词 [跳过歌词 ...]] [--phone 手机] [--pwd 密码] [--save [保存到]]
                [--load [保存的登陆信息文件]]
                链接

PyNCM 网易云音乐下载工具 1.6.5.5

positional arguments:
链接                    网易云音乐分享链接

optional arguments:
-h, --help            show this help message and exit

下载:
--template 模板         保存文件名模板
                            参数:
                                id     - 网易云音乐资源 ID
                                year   - 出版年份
                                no     - 专辑中编号
                                album  - 专辑标题
                                track  - 单曲标题
                                title  - 完整标题
                                artists- 艺术家名
                            例:
                                {track} - {artists} 等效于 {title}
--quality 音质          音频音质(高音质需要 CVIP)
                            参数:
                                lossless - “无损”
                                high     - 较高
                                standard - 标准
--output 输出           输出文件夹

歌词:
--lyric-no 跳过歌词 [跳过歌词 ...]
                        跳过某些歌词类型的合并
                            参数:
                                lrc    - 源语言歌词
                                tlyric - 翻译后歌词
                                romalrc- 罗马音歌词
                            例:
                                --lyric-no tlyric --lyric-no romalrc 将只下载源语言歌词

登陆:
--phone 手机            网易账户手机号
--pwd 密码              网易账户密码
--save [保存到]          写本次登录信息于文件
--load [保存的登陆信息文件]    从文件读取登录信息供本次登陆使用
--http                 优先使用 HTTP,不保证不被升级
--log-level LOG_LEVEL
                       日志等级

使用示例

python -m pyncm http://music.163.com/song?id=31140560 --phone... --password...
python -m pyncm http://music.163.com/album?id=3111188&userid=315542615  ...  

其他功能详见

API 使用示例

>>> from pyncm import apis
# 获取歌曲信息    
>>> apis.track.GetTrackAudio(29732235)
{'data': [{'id': 29732235, 'url': 'http://m701.music...
# 获取歌曲详情
>>> apis.track.GetTrackDetail(29732235)    
{'songs': [{'name': 'Supernova', 'id': 2...
# 获取歌曲评论
>>> apis.track.GetTrackComments(29732235)    
{'isMusician': False, 'userId': -1, 'topComments': [], 'moreHot': True, 'hotComments': [{'user': {'locationInfo': None, 'liveIn ...

API 说明

大部分 API 函数已经详细注释,可读性较高。推荐参阅 API 源码 获得支持

感谢

Android逆向——网易云音乐排行榜api(上)

Binaryify/NeteaseCloudMusicApi

衍生项目

PyNCMd

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.6.5.8.tar.gz (38.7 kB view details)

Uploaded Source

Built Distribution

pyncm-1.6.5.8-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

Details for the file pyncm-1.6.5.8.tar.gz.

File metadata

  • Download URL: pyncm-1.6.5.8.tar.gz
  • Upload date:
  • Size: 38.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for pyncm-1.6.5.8.tar.gz
Algorithm Hash digest
SHA256 480996dfb9cea282379c563606d422adfdd2775b35400259129bc0708cb8d6e8
MD5 381bbaa9be0c42815b3e3cbbfb77046e
BLAKE2b-256 9f7e510720de53d382ef217d90ed17ed4d6c9acef7a890f058f6cc569dfa208e

See more details on using hashes here.

File details

Details for the file pyncm-1.6.5.8-py3-none-any.whl.

File metadata

  • Download URL: pyncm-1.6.5.8-py3-none-any.whl
  • Upload date:
  • Size: 45.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for pyncm-1.6.5.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3553fcd30af0ea3e2a6ef2d77e0e3c8c28fad50d48c818761da9fc4db95d738e
MD5 b9f736b7a2f9e4ace1454223afbc57d9
BLAKE2b-256 fa2218ebd96e9ec80576be6bf981aaf1a4d0e0c0843b09ffb8ec5e7346dddd24

See more details on using hashes here.

Supported by

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