Skip to main content

一个用于从主流音乐平台下载音乐的第三方库

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.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请自己获取

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

fuyaodownloadmusic-0.0.8.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

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

fuyaodownloadmusic-0.0.8-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file fuyaodownloadmusic-0.0.8.tar.gz.

File metadata

  • Download URL: fuyaodownloadmusic-0.0.8.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

Hashes for fuyaodownloadmusic-0.0.8.tar.gz
Algorithm Hash digest
SHA256 a5032d86224bcca078b87f3b95fd7edb1f0b05c62f2d2d596ce4c7bb43cb2b28
MD5 715bed0fcf2e910e0ef556274597e048
BLAKE2b-256 525dc17e205c98547fd9684097e3959201b60890482a80e4b008eee621e08e94

See more details on using hashes here.

File details

Details for the file fuyaodownloadmusic-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for fuyaodownloadmusic-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a5d50ed60a492034f2fe37190dbf085ff1abe81a4543c0e74b052e4d2abae0f4
MD5 c7d3809bddb309ecb4ab074acfac6631
BLAKE2b-256 e058d82beba64f8fe54763c5452b167521320a44288a0bec6ff1e1bc3702648b

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