一个用于从主流音乐平台下载音乐的第三方库
Project description
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.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请自己获取
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fuyaodownloadmusic-0.0.7.tar.gz.
File metadata
- Download URL: fuyaodownloadmusic-0.0.7.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c67150b440629facf927daa11689ac7370d684de8c3902161c4a87385376bc15
|
|
| MD5 |
e8aa3716885ced586df4494c3324d60c
|
|
| BLAKE2b-256 |
cb8b5d3582a0f96ab8415878e8a9b9806fd507982c90443e902ae62161a8b69f
|
File details
Details for the file fuyaodownloadmusic-0.0.7-py3-none-any.whl.
File metadata
- Download URL: fuyaodownloadmusic-0.0.7-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbd94df5fb064dd4e80dd94ff17e3786ef02de25f1b49c09278570b1ede714ae
|
|
| MD5 |
1c1d7b82aa750d82a856da656a704334
|
|
| BLAKE2b-256 |
b50d62d58afbb4196a473975c8f046528ebcb9277dfd70c6c5297f483df0b1dc
|