Skip to main content

🎵 优雅的网易云音乐下载工具

Project description

🎵 Melodia

网易云音乐下载工具

PyPI version Python 3.7+ License: MIT

🚀 快速开始

安装

pip install pymelodia

基本使用

# 下载单首歌曲
melodia download song 390345

# 下载歌单
melodia download playlist 123456

# 下载指定分类的音乐
melodia download category 华语

# 下载所有分类
melodia download all

# 获取下载链接
melodia get link 390345

# 清理重复文件
melodia clean /path/to/music

📖 详细使用

下载命令

# 单曲下载
melodia download song 390345

# 批量下载多首歌曲
melodia download song "['390345', '123456', '789012']"

# 歌单下载
melodia download playlist 2829883282

# 批量下载多个歌单
melodia download playlist "['2829883282', '3779629']"

# 分类下载(支持华语、欧美、日语等)
melodia download category 华语

# 下载所有支持的分类
melodia download all

配置选项

# 设置保存路径
melodia --save-path /path/to/music download song 390345

# 设置请求延时(避免频率限制)
melodia --delay 1 download category 华语

# 设置最大页数
melodia --max-pages 50 download all

# 设置用户Cookie(提升成功率)
melodia --cookie "your_cookie_here" download playlist 123456

支持的音乐分类

语言分类:华语、欧美、日语、韩语、粤语

风格分类:流行、摇滚、民谣、电子、舞曲、说唱、轻音乐、爵士、乡村

场景分类:清晨、夜晚、学习、工作、午休、下午茶、地铁、驾车

情感分类:怀旧、清新、浪漫、伤感、治愈、放松、孤独、感动

主题分类:综艺、影视原声、ACG、儿童、校园、游戏、经典

🎯 界面预览

🎵 Melodia 下载进度 🎵
════════════════════════════════════════════════════════════════

歌曲列表                   [████████████░░░░░░░░░░] 60.0% (3/5)
歌单列表                   [██████████████████░░] 90.0% (9/10)
categories                 [████████████████████] 100.0% (8/8)

📝 实时日志
────────────────────────────────────────────────────────────────
[14:32:15] [INFO] ℹ️ 开始下载歌曲 ID: 390345
[14:32:16] [SUCCESS] ✅ 成功下载: xxxx
[14:32:17] [INFO] ℹ️ 正在处理歌单...

⚙️ 高级配置

配置文件

程序会在用户目录下创建配置文件 ~/.melodia/config.json

{
  "save_path": "./music/",
  "delay": 3,
  "max_pages": 20,
  "cookie": "",
  "music_class": "全部",
  "temp_path": "./temp.mp3",
  "hashed_storage_enabled": true,
  "hashed_storage_digit": 3
}

环境变量

export MD_SAVE_PATH=./music/
export MD_TEMP_PATH=./temp/
export MD_CLASS=华语
export MD_DELAY=3
export MD_COOKIE=""
export MD_MAX_PAGES=20
export MD_HASHED_STORAGE=False
export MD_HASHED_STORAGE_DIGIT=2

配置管理命令

# 显示当前配置信息
melodia config show
melodia get config

# 保存配置到文件
melodia config save --hashed-storage --hashed-storage-digit 30

参数优先级

命令行参数 > 环境变量 > 配置文件 > 默认值

🛠️ 开发

本地开发

git clone https://github.com/yht0511/MusicSpider.git
cd MusicSpider
pip install -e .

📄 许可证

本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。

⚠️ 免责声明

本工具仅供学习和研究使用,请勿用于商业用途。下载的音乐文件请在24小时内删除,如需长期使用请购买正版音乐。

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

pymelodia-1.0.2.tar.gz (31.0 kB view details)

Uploaded Source

Built Distribution

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

pymelodia-1.0.2-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file pymelodia-1.0.2.tar.gz.

File metadata

  • Download URL: pymelodia-1.0.2.tar.gz
  • Upload date:
  • Size: 31.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pymelodia-1.0.2.tar.gz
Algorithm Hash digest
SHA256 57929bbe3203907e7b901881396ded0b182e38b957ab47ff14d4a0cb54f05d91
MD5 2a3755d290f9018dd64ec3034525478a
BLAKE2b-256 896c09b3e3aa96187c850ddf5ba6690a6c8d18d82f1873631d6b1f5f54041a88

See more details on using hashes here.

File details

Details for the file pymelodia-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pymelodia-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 34.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pymelodia-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4faac25b98b7d03253988120cf647e19fe9fc8b4cd359deae8f764aa8a8608a7
MD5 bf0d95f9e95ddf8a8f4d4742e457772d
BLAKE2b-256 f56f45ce7f57581e8d4b1995fa8733eb3644109f29bef6406e67cca233d29d7d

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