Giter Site home page Giter Site logo

netease-dl's Introduction

一个基于命令行的网易云音乐下载器。

安装

Git clone最新版

$ git clone https://github.com/ziwenxie/netease-dl
$ python3 setup.py install

PyPi安装

$ pip3 install netease-dl

p.s: 目前仅支持Python3.x,Python2.x以后也会支持。

功能特性

通过--help可以查看到所有的功能特性,包括下载单首歌曲,一张唱片的所有歌曲,一个歌手的前50首热门歌曲,一张歌单的所有歌曲,一个用户的公开歌单以及登录后可下载个人的私有歌单。

$ netease-dl --help
Usage: netease-dl [OPTIONS] COMMAND [ARGS]...

  A command tool to download NetEase-Music's songs.

Options:
  -t, --timeout INTEGER  Time to wait before giving up, in seconds.
  -p, --proxy TEXT       Use the specified HTTP/HTTPS/SOCKS proxy.
  -o, --output PATH      Specify the storage path.
  -q, --quiet            Automatically select the best one.
  -l, --lyric            Download lyric.
  -a, --again            Login Again.
  --help                 Show this message and exit.

Commands:
  album     Download a album's songs by name or id.
  artist    Download a artist's hot songs by name or id.
  me        Download my playlists.
  playlist  Download a playlist's songs by id.
  song      Download a song by name or id.
  user      Download a user's playlists by id.

使用

下载单首歌曲

使用song命令,在后面通过--name或者-n选项来指定歌曲的名字:

$ netease-dl song --name 成都
+----------+----------------------------+-------------+
| Sequence |         Song Name          | Artist Name |
+----------+----------------------------+-------------+
|    1     |            成都             |     赵雷    |
...
+----------+----------------------------+-------------+
Select one song [1]:
Downlaoding 成都 12831kb  [####################################]  100%

上面会返回10条搜索结果,可以在song命令前面加一个--quietnetease-dl会自动匹配第一个返回的结果:

$ netease-dl --quiet song --name 成都
Downlaoding 成都 12831kb  [####################################]  100%

如果知道歌曲id的话,也可以直接使用--id或者-i选项来指定:

$ netease-dl song --id 436514312
Downlaoding 成都 12831kb  [####################################]  100%

netease-dl的所有子命令所支持的特性都可以通过在子命令后面加一个--help选项来查看:

$ netease-dl song --help
Usage: netease-dl song [OPTIONS]

  Download a song by name or id.

Options:
  -n, --name TEXT   Song name.
  -i, --id INTEGER  Song id.
  --help            Show this message and exit.

下载一个歌手的50首热门歌曲

使用artist命令,并且在后面通过--name或者-n选项来指定歌手的姓名:

$ netease-dl artist --name 陈奕迅
Downlaoding 陪你度过漫长岁月 9471kb  [####################################]  100%
Downlaoding 不要说话 11149kb  [####################################]  100%
...
Cost 215s

和上面下载歌曲的时候一样,也可以使用--quiet--id,下面也是一样的原理,接下来我就不重复了。

下载一张唱片的所有歌曲

使用album命令,后面接--name或者-n选项来指定唱片的名字:

$ netease-dl album --name 范特西
+----------+-------------------+-----------------+
| Sequence |     Album Name    |   Artist Name   |
+----------+-------------------+-----------------+
|    1     |       范特西       |      周杰伦      |
...
+----------+-------------------+-----------------+
Select one album [1]:
Downlaoding 爱在西元前 3661kb  [####################################]  100%
Downlaoding 爸我回来了 3682kb  [####################################]  100%
Downlaoding 简单爱 4235kb  [####################################]  100%
...
Cost 24s

下载一张歌单的所有歌曲

使用playlist命令,后面接--name或者-n选项来指定歌单的名字:

$ netease-dl playlist --name 美国Billboard周榜
+----------+------------------------------------+
| Sequence |                Name                |
+----------+------------------------------------+
|    1     |       美国billboard周榜Top50        |
|    2     |       2016美国Billboard周榜         |
|    3     |         美国billboard周榜           |
+----------+------------------------------------+
Select one playlist [1]:
Downlaoding Shape of You 3611kb  [####################################]  100%
Downlaoding Bad and Boujee 5227kb  [####################################]  100%
Downlaoding Thats What I Like 3230kb  [####################################]  100%
...
Cost 152s

下载指定用户的公开歌单

> netease-dl user --name 子文歇
+----------+--------------------------------------+
| Sequence |                 Name                 |
+----------+--------------------------------------+
|    1     |            子文歇喜欢的音乐             |
...
+----------+--------------------------------------+
Select one playlist [1]:
...

下载个人收藏以及创建的歌单

登录之后可以下载自己的所有歌单包括私密的歌单,以后一段之间之内如果没有修改过密码就不需要重新登录了:

$ netease-dl me
Please enter your email or phone number: [email protected]
Please enter your password:
+----------+--------------------------------------+
| Sequence |                 Name                 |
+----------+--------------------------------------+
|    1     |            子文歇喜欢的音乐             |
|    2     |            子文歇收藏的音乐             |
...
+----------+--------------------------------------+
Select one playlist [1]:
...

如果要换一个帐号或者登录密码修改了,使用--again或者-a选项重新登录:

$ netease-dl --again me

Contact

Email: [email protected] Blog: www.ziwenxie.site WeChat: ziwenxie97

netease-dl's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.