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.1

1.音乐源: 网易(netease) 2.对网易云的api做逆向,目前提供网易的vip的cookie,但是不负责其稳定性,如需要稳定vip请自己获取

v0.0.2

1.修复导包问题

v0.0.5

1.修复包中没有js文件 2.修复logger.info的报错问题

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.6.tar.gz (13.8 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.6-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fuyaodownloadmusic-0.0.6.tar.gz
  • Upload date:
  • Size: 13.8 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.6.tar.gz
Algorithm Hash digest
SHA256 8872a2736a6973d38b8f859e8226ca3b04357113e0e305bef0a8c906eb1d1ff3
MD5 9ed0134dd72d7dde50bb5765a4bf0b1a
BLAKE2b-256 e3e68dc98d1ec53663ac1456bd24b6d870ab8726051a279a9a4c044fe9a7c898

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fuyaodownloadmusic-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0ced4e418752723147804e002c5a7f19f661e744a757b7be1792e6dd5e8ae055
MD5 daf8995884ab23a190db095f89e34138
BLAKE2b-256 87e9dd0477d0686620c2dd0586e76b2dc87e92c39c0bcb7d85dd64c985d059a6

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