该工具用于下载喜马拉雅歌曲资源,可以下载单个音频资源,也可以下载整个专辑. 喜欢的请打个红心!!!
python -V
wget https://raw.githubusercontent.com/smallmuou/xmlyfetcher/master/xmlyfetcher
sudo cp xmlyfetcher /usr/local/bin
sudo chmod +x /usr/local/bin/xmlyfetcher
xmlyfetcher 专辑ID 类型 参数
专辑ID可以通过浏览器URL获取,如https://www.ximalaya.com/album/2677356,则专辑ID为2677356
类型分为3种,分别是all、page、track
all - 下载整个专辑
page - 下载若干页曲目,支持传递多个页号,从1开始,每页30
track - 下载若干曲目,支持传递多个曲目ID,曲目ID可以通过浏览器URL获取,比如点击某个曲目,其URL为https://www.ximalaya.com/sound/25202,则曲目ID为25202
# 下载专辑
xmlyfetcher 12891461 all
# 下载专辑前2页
xmlyfetcher 12891461 page 1 2
# 下载单个曲目
xmlyfetcher 12891461 track 211393643
PS: 可以使用xmlyfetcher -h
查看更详细的帮助
xmlyfetcher version 2.0.0 by smallmuou
USAGE: xmlyfetcher [OPTIONS] albumId type [type-param1 [type-param1 ...]]
DESCRIPTION:
This tool is used to download tracks under ximalaya.com.
albumId - the id of album, you can see from url,like https://www.ximalaya.com/album/2677356, the albumId is 2677356
type - all/page/track, when type is all, no type-params required; when type is page, the type-params is the pagenum (start with 1); when type is track, the type-params is trackid;
trackId - the id of track, you can see from url,like https://www.ximalaya.com/sound/25202, the trackId is 25202
OPTIONS:
-h Show this help message and exit.
-o Output directory, default is current directory.
EXAMPLES:
xmlyfetcher 12891461 all
xmlyfetcher 12891461 page 1 2 3
xmlyfetcher 12891461 track 211393643
xmlyfetcher -o ~/tmp 12891461 track 211393643
2.0.1(2023.2.7)
2.0.0(2023.1.31)
1.1.1(2019.9.29)
1.1.0(2019.9.12)
1.0.3(2019.9.10)
1.0.2
1.0.1
1.0.0
该开源工具具有MIT许可协议. 本工具仅限个人学习,不用于商业等用途. 所涉及的音视频资源版权归喜马拉雅所有.