FuyaoDownloadMusic
一个可以从主流音乐平台下载音乐的第三方库
下载
pip install FuyaoDownloadMusic
使用
1.选择音乐源:目前支持网易云(netease)
2.音乐源对应的搜索、获取、下载的参数
SEARCH_PARAMS = {
"keyword": "知我",
"limit": 30
}
SONG_URL_PARAMS = {
"songId": 1394167216,
}
DOWNLOAD_SONG_PARAMS = {
"songUrl": "",
"songName": "知我",
"songAuthors": "",
"songSavePath": "",
}
3.代码样例
from FuyaoDownloadMusic.download import DownloadMusic
COOKIE_STR = {
"netease": "MUSIC_U", # 获取网易的MUSIC_U
}
dm = DownloadMusic(
musicSrcKey="netease", # 音乐源
cookieStr="...", # 音乐平台的会员关键cookie
)
# search
dm.search({
"keyword": "知我",
"limit": 30
})
# return songId、songName、songAuthors
# [{"songId": xxx, "songName": "xxx", "songAuthors": ["xxx", "xxxx"]}]
# get song url
dm.getSongUrl({
"songId": 1394167216,
})
# return songUrl
# download music
dm.downloadMusic({
"songUrl": "https://....",
"songName": "知我",
"songAuthors": "...",
"songSavePath": "E:/music",
})
注意
- 需要node环境,且在项目根目录安装 crypto-js 库
- 使用该包需要保证nodejs环境且在代码同层级目录使用 npm install crypto-js
更新日志
版本说明:
0.0.1:
0:发行版本
0:开发版本
1:测试版本
v0.0.8
1.优化第三方库及项目结构
v0.0.7
1.新增酷狗音乐源-vip
2.将各个音乐源的download函数提取放置在download模块中,减少重复代码
v0.0.6
1.修改返回格式:"xxx;xxx" => ["xxx", "xxx"]
v0.0.5
1.修复包中没有js文件
2.修复logger.info的报错问题
v0.0.2
1.修复导包问题
v0.0.1
1.音乐源: 网易(netease)
2.对网易云的api做逆向,目前提供网易的vip的cookie,
但是不负责其稳定性,如需要稳定vip请自己获取
Metadata
Release files for FuyaoDownloadMusic 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fuyaodownloadmusic-0.0.8.tar.gz | 18.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fuyaodownloadmusic-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.6 kB
Release files / fuyaodownloadmusic-0.0.8.tar.gz
| Download URL | fuyaodownloadmusic-0.0.8.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a5032d86224bcca078b87f3b95fd7edb1f0b05c62f2d2d596ce4c7bb43cb2b28
|
|
BLAKE2b-256 checksum How to use checksums |
525dc17e205c98547fd9684097e3959201b60890482a80e4b008eee621e08e94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.7
|
Release files / fuyaodownloadmusic-0.0.8-py3-none-any.whl
| Download URL | fuyaodownloadmusic-0.0.8-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5d50ed60a492034f2fe37190dbf085ff1abe81a4543c0e74b052e4d2abae0f4
|
|
BLAKE2b-256 checksum How to use checksums |
e058d82beba64f8fe54763c5452b167521320a44288a0bec6ff1e1bc3702648b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.7
|