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-threads 8 download playlist 123456

# 禁用多线程下载(使用串行下载)
melodia --no-multithreading download category 华语

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

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

# 设置多线程下载(提升速度)
melodia --max-threads 8 download playlist 123456

# 禁用多线程下载(使用串行下载)
melodia --no-multithreading 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,
  "max_threads": 4,
  "enable_multithreading": true
}

环境变量

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
export MD_MAX_THREADS=8
export MD_ENABLE_MULTITHREADING=true

配置管理命令

# 显示当前配置信息
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.1.0.tar.gz (32.7 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.1.0-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pymelodia-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e36876e8c0a5e0318333a7f172bc3d1121187dfb7990c6d783570932415b8ede
MD5 563ae5ae954ff589733584a701f8fccb
BLAKE2b-256 1c360afafffccc9469e652fe0cda4c95300757c825362ad363af4a6b3b76a75a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymelodia-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.0 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03b7e3c718e9e25bc43a5480994f6bce89fc4a7936c849ee0b7e1d03be130fb1
MD5 32dd6f6fe9ea1cd34e3e92c1c603f29e
BLAKE2b-256 31f8d91557df713ddaeb791d85d34617dae9574c0059fc5e21e9b7be4b32cf26

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