| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
fvbd8769
7年前发布

"Python开源:netease-dl -基于命令行的网易云音乐下载器"

   <p>一个基于命令行的网易云音乐下载器。</p>    <ul>     <li>安装      <ul>       <li>Git clone最新版</li>       <li>PyPi安装</li>      </ul> </li>     <li>功能特性</li>     <li>使用      <ul>       <li>下载单首歌曲</li>       <li>下载一个歌手的50首热门歌曲</li>       <li>下载一张唱片的所有歌曲</li>       <li>下载一张歌单的所有歌曲</li>       <li>下载指定用户的公开歌单</li>       <li>下载个人收藏以及创建的歌单</li>      </ul> </li>     <li>Contact</li>    </ul>    <h2>安装</h2>    <h3>Git clone最新版</h3>    <pre>  <code class="language-python">$ git clone https://github.com/ziwenxie/netease-dl  $ python3 setup.py install</code></pre>    <h3>PyPi安装</h3>    <pre>  <code class="language-python">$ pip3 install netease-dl</code></pre>    <p>p.s: 目前仅支持Python3.x,Python2.x以后也会支持。</p>    <h2>功能特性</h2>    <p>通过 --help 可以查看到所有的功能特性,包括下载单首歌曲,一张唱片的所有歌曲,一个歌手的前50首热门歌曲,一张歌单的所有歌曲,一个用户的公开歌单以及登录后可下载个人的私有歌单。</p>    <pre>  <code class="language-python">$ 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.</code></pre>    <h2>使用</h2>    <h3>下载单首歌曲</h3>    <p>使用 song 命令,在后面通过 --name 或者 -n 选项来指定歌曲的名字:</p>    <pre>  <code class="language-python">$ netease-dl song --name 成都  +----------+----------------------------+-------------+  | Sequence |         Song Name          | Artist Name |  +----------+----------------------------+-------------+  |    1     |            成都             |     赵雷    |  ...  +----------+----------------------------+-------------+  Select one song [1]:  Downlaoding 成都 12831kb  [####################################]  100%</code></pre>    <p>上面会返回10条搜索结果,可以在 song 命令前面加一个 --quiet , netease-dl 会自动匹配第一个返回的结果:</p>    <pre>  <code class="language-python">$ netease-dl --quiet song --name 成都  Downlaoding 成都 12831kb  [####################################]  100%</code></pre>    <p>如果知道歌曲id的话,也可以直接使用 --id 或者 -i 选项来指定:</p>    <pre>  <code class="language-python">$ netease-dl song --id 436514312  Downlaoding 成都 12831kb  [####################################]  100%</code></pre>    <p>netease-dl 的所有子命令所支持的特性都可以通过在子命令后面加一个 --help 选项来查看:</p>    <pre>  <code class="language-python">$ 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.</code></pre>    <h3>下载一个歌手的50首热门歌曲</h3>    <p>使用 artist 命令,并且在后面通过 --name 或者 -n 选项来指定歌手的姓名:</p>    <pre>  <code class="language-python">$ netease-dl artist --name 陈奕迅  Downlaoding 陪你度过漫长岁月 9471kb  [####################################]  100%  Downlaoding 不要说话 11149kb  [####################################]  100%  ...  Cost 215s</code></pre>    <p>和上面下载歌曲的时候一样,也可以使用 --quiet 和 --id ,下面也是一样的原理,接下来我就不重复了。</p>    <h3>下载一张唱片的所有歌曲</h3>    <p>使用 album 命令,后面接 --name 或者 -n 选项来指定唱片的名字:</p>    <pre>  <code class="language-python">$ 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</code></pre>    <h3>下载一张歌单的所有歌曲</h3>    <p>使用 playlist 命令,后面接 --name 或者 -n 选项来指定歌单的名字:</p>    <pre>  <code class="language-python">$ 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</code></pre>    <h3>下载指定用户的公开歌单</h3>    <pre>  <code class="language-python">> netease-dl user --name 子文歇  +----------+--------------------------------------+  | Sequence |                 Name                 |  +----------+--------------------------------------+  |    1     |            子文歇喜欢的音乐             |  ...  +----------+--------------------------------------+  Select one playlist [1]:  ...</code></pre>    <h3>下载个人收藏以及创建的歌单</h3>    <p>登录之后可以下载自己的所有歌单包括私密的歌单,以后一段之间之内如果没有修改过密码就不需要重新登录了:</p>    <pre>  <code class="language-python">$ netease-dl me  Please enter your email or phone number: ziwenxiecat@163.com  Please enter your password:  +----------+--------------------------------------+  | Sequence |                 Name                 |  +----------+--------------------------------------+  |    1     |            子文歇喜欢的音乐             |  |    2     |            子文歇收藏的音乐             |  ...  +----------+--------------------------------------+  Select one playlist [1]:  ...</code></pre>    <p>如果要换一个帐号或者登录密码修改了,使用 --again 或者 -a 选项重新登录:</p>    <pre>  <code class="language-python">$ netease-dl --again me</code></pre>    <h2> </h2>    <p> </p>    
 本文由用户 fvbd8769 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1489544237459.html
网易 Python开发