{"id":13714423,"url":"https://github.com/sk1418/zhuaxia","last_synced_at":"2025-12-25T11:41:49.436Z","repository":{"id":14400066,"uuid":"17110706","full_name":"sk1418/zhuaxia","owner":"sk1418","description":"download mp3 files/albums from xiami.com and music.163.com","archived":false,"fork":false,"pushed_at":"2018-09-10T20:55:28.000Z","size":332,"stargazers_count":412,"open_issues_count":4,"forks_count":87,"subscribers_count":30,"default_branch":"master","last_synced_at":"2024-05-23T04:46:58.597Z","etag":null,"topics":["163music","mp3","xiami"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sk1418.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-23T15:41:14.000Z","updated_at":"2024-04-23T12:47:31.000Z","dependencies_parsed_at":"2022-07-15T15:30:53.175Z","dependency_job_id":null,"html_url":"https://github.com/sk1418/zhuaxia","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sk1418%2Fzhuaxia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sk1418%2Fzhuaxia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sk1418%2Fzhuaxia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sk1418%2Fzhuaxia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sk1418","download_url":"https://codeload.github.com/sk1418/zhuaxia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224551263,"owners_count":17330114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["163music","mp3","xiami"],"created_at":"2024-08-02T23:01:59.191Z","updated_at":"2025-12-25T11:41:49.377Z","avatar_url":"https://github.com/sk1418.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"**[\u003e\u003e\u003e\u003e English Version \u003c\u003c\u003c\u003c](README_EN.md)**\n\n\n#### Table of contents\n(toc is generated by [ghtoc](https://github.com/sk1418/ghtoc))\n- [简介](#introduction)\n- [依赖](#dependencies)\n- [功能](#features)\n- [安装](#installation)\n- [使用](#usage)\n\t- [海外IP代理支持](#proxy-setting)\n        - [获得中国代理服务器](#how-to-get-china-proxy)\n- [Screenshots](#screenshots)\n- [Change logs](#changelog)\n\n\n## Introduction\n\nzhuaxia 是一个基于命令行的虾米音乐 ( www.xiami.com 以下简称[虾])和网易云音乐( music.163.com 以下简称[易]) 多线程批量下载工具\n\n\n**zhuaxia** 的开发调试环境:\n- python 2.7.6\n\n\n## Dependencies\n\n- requests module\n- mutagen module\n- beautifulsoup4 module\n- pycrypto module\n\n## Features\n- 自动识别解析URL. 目前支持：\n\t- [虾] 歌曲，专辑，精选集，用户收藏[todo], 歌手热门\n\t- [易] 歌曲，专辑，歌单，歌手热门\n- 下载歌手热门歌曲:数量可配置(\u003c=0 无限制 [虾]只下载第一页) ，默认Top10。 配置项: `download.artist.topsong`，需要艺人页面链接\n- 支持包含音乐资源URL的文件作为输入进行批量下载. URL可以是[虾]和[易]混合, 可以不同音乐类型混合 (`-f` 参数)\n- 当以文件作为输入批量下载时, 多线程(可配置线程池)解析URL\n- 多线程(可配置线程池)下载歌曲\n- [虾]支持以VIP账户登录下载高音质(320kbps) mp3, 并不消耗VIP的下载额度 (`-H` 选项)\n- [易]支持下载高音质(320kbps) mp3 (`-H` 选项)\n- 进度显示 (色彩高亮，终端宽度改变自动适应，总进度，下载线程进度...)\n- mp3文件重命名, 更新mp3 meta信息，自动下载专辑封面, 专辑文本介绍(仅[虾])...等等\n- [虾]配置项`china.proxy.http=ip:port` 来设置国内的代理服务进行解析和下载。详见：\"Usage -\u003e 海外IP下载资源\" 一节\n- 加入实验性`-p`选项，尝试解决频繁请求被服务器ban的问题\n- 中英文命令行界面. 配置项 `lang=en|cn` 默认中文(`cn`)\n- 下载歌曲的同时下载歌词，保存为同名`lrc`文件 (`-l`选项)\n- 从`v3.0.0`开始zhuaxia维护一个下载历史记录, 支持增量下载(`-i` 选项). 增量下载时, 曾下载过的歌曲将被忽略\n- 支持下载历史的导出(`-e`),清空(`-d`)\n- 所有下载完成时显示/保存本次下载详情\n\n\n\n## Installation\n\nArchlinux 用户, zhuaxia可以从AUR中获取\n\n稳定版本(master branch)：\n\n稳定版本：\n\n\tyaourt -S zhuaxia\n\n最新git版本(bleeding branch):\n\n\tyaourt -S zhuaxia-git\n\n其他用户:\n\n\tsudo python setup.py install\n\n## Usage\n\n- 配置文件， 第一次运行`zx`后， 在`$HOME/.zhuaxia/` 会有配置文件 `zhuaxia.conf` 配置参数有中文说明\n\n- 使用：\n\n\n\t\tzhuaxia (抓虾) -- 抓取[虾米音乐]和[网易云音乐]的 mp3 音乐\n\n\t\t[CONFIG FILE:] $HOME/.zhuaxia/zhuaxia.conf\n\t\t\t\t\t   缺省配置文件会在第一次运行zhuaxia时自动生成\n\n\t\t[OPTIONS]\n\t\t\t-H : 首选HQ质量(320kbps),\n\t\t\t\t\u003e 虾米音乐 \u003c\n\t\t\t\t\t- 配置文件中需给出正确登录信箱和密码, 登录用户需拥有VIP身份\n\t\t\t\t\t- 用户需在xiami vip设置页面设置默认高音质\n\t\t\t\t\t- 此选项对不满足上两项情况无效，仍下载128kbps资源\n\t\t\t\t\u003e 网易音乐 \u003c\n\t\t\t\t\t-无需特殊要求,直接下载高音质资源\n\n\n\t\t\t-h : 显示帮助\n\n\t\t\t-l : 下载歌曲的lrc格式歌词\n\n\t\t\t-f : 从文件下载\n\n\t\t\t-i : 增量下载. zhuaxia依靠历史记录来判定一首歌是否曾被下载\n\t\t\t\t 曾经被下载过的歌曲将被略过. 判断一首歌曲是否被下载过靠3个属性:\n\t\t\t\t song_id(虾米或网易的歌曲id), source (虾米/网易), quality (H/L)\n\n\t\t\t-e : 导出当前下载历史记录到文件\n\t\t\t\t 如果这个选项被使用, 其它选项将被忽略\n\n\t\t\t-d : 清空当前下载历史记录\n\t\t\t\t 如果这个选项被使用, 其它选项将被忽略. \n\t\t\t\t -e 和-d 选项不能同时使用\n\n\t\t\t-v : 显示版本信息\n\n\t\t\t-p : (实验性选项)使用代理池下载\n\t\t\t\t在下载/解析量大的情况下，目标服务器会对禁止频繁的请求，所以zhuaxia可以自动获取 代理来解析和下载资源。因为获取的代理速度/可靠性不一，下载可能会缓慢或不稳定。\n\n\t\t[USAGE]\n\n\t\t\tzx [OPTION] \u003cURL\u003e\n\t\t\t\t: 下载指定URL资源, 抓虾自动识别链接, 支持\n\t\t\t\t\t- [虾] 歌曲，专辑，精选集，用户收藏,艺人TopN\n\t\t\t\t\t- [易] 歌曲，专辑，歌单，艺人TopN\n\t\t\t\t例子：\n\t\t\t\t  zx \"http://www.xiami.com/space/lib-song/u/25531126\"\n\t\t\t\t  zx \"http://music.163.com/song?id=27552647\"\n\n\t\t\tzx [OPTION] -f \u003cfile\u003e\n\t\t\t\t: 多个URL在一个文件中，每个URL一行。 URLs可以是混合[虾]和[易]的不同类型音乐资源。例子：\n\n\t\t\t\t  \u003e$ cat /tmp/foo.txt\n\t\t\t\t\thttp://music.163.com/artist?id=5345\n\t\t\t\t\thttp://www.xiami.com/song/1772130322\n\t\t\t\t\thttp://music.163.com/album?id=2635059\n\t\t\t\t\thttp://www.xiami.com/album/32449\n\t\t\t\t  \u003e$ zx -f /tmp/foo.txt\n\n\t\t\tOther Examples:\n\n\t\t\t\t\t下载歌曲和歌词:\n\t\t\t\t\t\tzx -l \"http://music.163.com/song?id=27552647\"\n\n\t\t\t\t\t增量下载, 并下载歌词\n\t\t\t\t\t\tzx -li \"http://music.163.com/song?id=27552647\"\n\n\t\t\t\t\t导出下载历史记录. 文件会被保存在配置文件设置的\"download.dir\"目录中\n\t\t\t\t\t\tzx -e\n\n\t\t\t\t\t清空所有下载历史记录\n\t\t\t\t\t\tzx -d\n         \n\n### Proxy setting\n\n**海外IP下载资源**\n\nxiami.com 和music.163都屏蔽了海外ip的资源下载请求。针对163的资源, zhuaxia 目前使用了一个还没检查IP的链接, 截止目前(2015-11-12), 扔可以直接下载.但是不保证长效。彻底解决xiami和163的海外下载问题，请看下面的选项：\n\n在配置文件中添加（如果不存在的话）`china.proxy.http=ip:port`, (以前叫`xiami.proxy.http`) 可以让zhuaxia通过代理来解析和下载资源。\n例如：\n\n\tchina.proxy.http=127.0.0.1:8080\n\n这里`ip:port`构成的http代理是国内的代理服务器。 如果你的机器已经是国内的ip，请注释或删除这个选项。\n\n**为兼容用户已存在的配置文件,老的`xiami.proxy.http` 选项还可使用,代理将对xiami,163同时生效. 但建议修改配置文件使用新的名字. 新旧两个proxy选项不能同时使用.**\n\n#### How to get China Proxy\n\n获取国内代理的简单方法：\n\n到http://proxy-list.org/ 搜索China的代理就好。\n\n或者 \n\n利用这个脚本 [cnProxy.py](https://github.com/sk1418/myScripts/blob/master/python/cnProxy.py) 获取按速度排名前N (默认5) 的中国代理服务器.\n\n## Screenshots\n\n- downloading (gif animation)\n![progress](https://raw.github.com/sk1418/sharedResources/master/zhuaxia/progress.gif)\n\n- parse input file\n![file view](https://raw.github.com/sk1418/sharedResources/master/zhuaxia/fileParse.gif)\n\n- parse url\n![url view](https://raw.github.com/sk1418/sharedResources/master/zhuaxia/urlParse.png)\n\n## Changelog\n\n[Click to check Change logs](CHANGELOG.txt)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsk1418%2Fzhuaxia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsk1418%2Fzhuaxia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsk1418%2Fzhuaxia/lists"}