Skip to content

Commit

Permalink
Merge pull request #16 from 0xHJK/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
0xHJK authored Mar 11, 2019
2 parents 01a8b6b + 4e6c519 commit 46766ae
Show file tree
Hide file tree
Showing 19 changed files with 1,080 additions and 79 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ report.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log
Expand Down Expand Up @@ -111,4 +110,5 @@ test.py
*.mp3
*.ogg
*.flac
!static/sample.mp3
!static/sample.mp3

32 changes: 6 additions & 26 deletions README.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Music-dl: Listen to what you want

<p align="center">
<a href="https://github.com/0xHJK/music-dl">
<img src="https://github.com/0xHJK/music-dl/raw/master/static/logo.png" height="400" alt="music-dl">
</a>
</p>
<hr>
<p align="center">
Expand All @@ -18,7 +20,7 @@
<a><img src="https://img.shields.io/github/license/0xHJK/music-dl.svg"></a>
</p>

**Music-dl** is a command line tool which helps you search and download music from multiple sources.
**[Music-dl](https://github.com/0xHJK/music-dl)** is a command line tool which helps you search and download music from multiple sources.

Support for QQ music, Netease music, Xiami music, Kugou music and Baidu music. See [supported sources](#supported-sources).

Expand All @@ -33,6 +35,7 @@ English | [中文文档](https://github.com/0xHJK/music-dl/blob/master/README.md
- Support for HTTP and SOCKS proxy
- Support for multithreading searching
- Support for merging and sorting results
- Support keyword highlighting

## Installation

Expand Down Expand Up @@ -82,32 +85,9 @@ Options:
--help Show this message and exit.
```

Example (Omitted some search results):

```
$ music-dl -k "Bruno Mars"
Searching Bruno Mars from ... QQ ... KUGOU ... NETEASE ... XIAMI ... BAIDU ...
---------------------------
[ 0 ] QQ | 0:04:30 - 4.13MB - Mark Ronson、Bruno Mars - Uptown Funk - Uptown Special
...
[ 7 ] KUGOU | 0:03:37 - 3.33MB - Bruno Mars - Talking to the Moon - It's Better If You Don't Understand
...
[ 22 ] BAIDU | 0:03:12 - 2.95MB - Bruno Mars - The lazy song - Enjoy the best karaoke's songs
---------------------------
Please enter the download serial number, support the format of 0 3-5 8, enter N to skip download
>>: 7
[ 7 ] KUGOU | 0:03:37 - 3.33MB - Bruno Mars - Talking to the Moon - It's Better If You Don't Understand
Downloading... [####################################] 100%
Saved at:/tmp/Bruno Mars - Talking to the Moon.mp3
```

Advanced usage:
Example:

![](https://github.com/0xHJK/music-dl/raw/master/static/advance.png)
![](https://github.com/0xHJK/music-dl/raw/master/static/preview-en.png)

## Supported sources

Expand Down
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Music-dl: Listen to what you want

<p align="center">
<a href="https://github.com/0xHJK/music-dl">
<img src="https://github.com/0xHJK/music-dl/raw/master/static/logo.png" height="400" alt="music-dl">
</a>
</p>
<hr>
<p align="center">
Expand All @@ -18,28 +20,30 @@
<a><img src="https://img.shields.io/github/license/0xHJK/music-dl.svg"></a>
</p>

**Music-dl** is a command line tool which helps you search and download music from multiple sources.
**[Music-dl](https://github.com/0xHJK/music-dl)** is a command line tool which helps you search and download music from multiple sources.

Support for QQ music, Netease music, Xiami music, Kugou music and Baidu music. See [supported sources](#支持的音乐源列表).

**Python3 Only. Python 3.5+ Recommended.**

[English](https://github.com/0xHJK/music-dl/blob/master/README.en.md) | 中文文档

**Music-dl**是一个基于Python3的命令行工具,可以从多个网站搜索和下载音乐,方便寻找音乐,解决不知道哪个网站有版权的问题。工具的本意是**聚合搜索**,API是从公开的网络中获得,**不是破解版**,也听不了付费歌曲。
**[Music-dl](https://github.com/0xHJK/music-dl)
**是一个基于Python3的命令行工具,可以从多个网站搜索和下载音乐,方便寻找音乐,解决不知道哪个网站有版权的问题。工具的本意是**聚合搜索**,API
是从公开的网络中获得,**不是破解版**,也听不了付费歌曲。

**禁止将本工具用于商业用途**,如产生法律纠纷与本人无关。

支持QQ音乐、网易云音乐、虾米音乐、酷狗音乐和百度音乐,查看 [支持的音乐源列表](#支持的音乐源列表)

> 注意: 部分音乐源在一些国家和地区不可用,可以考虑使用中国大陆代理。获取公共代理的方式可以参考我的另一个项目<https://github.com/0xHJK/Proxies>,两分钟获得数千个有效代理。
- 支持无损音乐(部分歌曲,默认不打开)

- 部分歌曲支持无损音乐
- 优先搜索高品质音乐(flac -> 320K -> 128K)
- 支持 HTTP 和 SOCKS 代理
- 支持多线程搜索
- 支持搜索结果去重和排序(默认不打开)
- 支持搜索结果去重和排序
- 支持搜索关键字高亮

> 注意:仅支持Python3,建议使用 **Python3.5 以上版本**
Expand Down Expand Up @@ -96,25 +100,21 @@ Options:
-c, --count INTEGER 搜索数量限制
-o, --outdir TEXT 指定输出目录
-x, --proxy TEXT 指定代理(如http://127.0.0.1:1087)
-m, --merge 对搜索结果去重和排序(默认不去重
-m, --merge 对搜索结果去重和排序(默认去重
-v, --verbose 详细模式
--help Show this message and exit.
```

- 默认搜索`qq netease kugou baidu xiami`,每个数量限制为5,保存目录为当前目录,不合并搜索结果
- 默认搜索`qq netease kugou baidu xiami flac`,每个数量限制为5,保存目录为当前目录。
- 指定序号时可以使用`1-5 7 10`的形式。
- 需要合并搜索结果时,排序顺序按照歌手和歌名排序,当两者都相同时保留最大的文件。
- 无损音乐歌曲数量较少,需要指定`-s "flac"`打开,如果没有无损会显示320K或128K。
- 默认对搜索结果排序和去重,排序顺序按照歌手和歌名排序,当两者都相同时保留最大的文件。
- 无损音乐歌曲数量较少,如果没有无损会显示320K或128K。
- 支持http代理和socks代理,格式形如`-x http://127.0.0.1:1087``-x socks5://127.0.0.1:1086`

普通示例(可以不写任何参数运行`music-dl`):
示例(可以不写任何参数运行`music-dl`):

![](https://github.com/0xHJK/music-dl/raw/master/static/preview.png)

高级示例(指定数量、关键字、音乐源、保存位置、详细模式、合并搜索结果):

![](https://github.com/0xHJK/music-dl/raw/master/static/advance.png)

## 支持的音乐源列表

| 音乐源 | 缩写 | 网址 |
Expand All @@ -132,6 +132,8 @@ Options:

## 更新记录

- 2019-03-11 开启默认支持所有音乐源,默认对搜索结果排序去重,优化显示效果,高亮搜索关键字和高品质音乐
- 2019-02 完成部分翻译(英语、德语、日语、克罗地亚语)感谢@anomie31 @DarkLinkXXXX @terorie的帮助,目前翻译尚未完善,欢迎提交PR改进翻译
- 2019-01-31 新增单元测试,集成发布,新增LOGO,新增小徽章,发布v2.1.0版本
- 2019-01-28 重写一半以上代码,全面优化,发布到pip库,发布v2.0.0版本
- 2019-01-26 支持http和socks代理,删除wget库,新增click库,发布v1.1版
Expand Down
133 changes: 133 additions & 0 deletions locale/de/LC_MESSAGES/music-dl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-19 23:43+0800\n"
"PO-Revision-Date: 2019-02-19 23:46+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.1\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: music_dl/__main__.py:27
#, python-brace-format
msgid "正在搜索 {searchterm} 来自 ..."
msgstr ""

#: music_dl/__main__.py:45
#, python-brace-format
msgid "音乐列表 {error} 获取失败."
msgstr ""

#: music_dl/__main__.py:59
msgid "请输入{下载序号},支持形如 {numbers} 的格式,输入 {N} 跳过下载"
msgstr ""

#: music_dl/__main__.py:60
msgid "下载序号"
msgstr ""

#: music_dl/__main__.py:71
msgid "输入有误!"
msgstr ""

#: music_dl/__main__.py:78
msgid "请输入要搜索的歌曲,或Ctrl+C退出"
msgstr ""

#: music_dl/__main__.py:88
msgid "请输入要搜索的歌曲,名称和歌手一起输入可以提高匹配(如 空帆船 朴树)"
msgstr ""

#: music_dl/__main__.py:89
msgid "搜索关键字"
msgstr ""

#: music_dl/__main__.py:95
msgid "支持的数据源: "
msgstr ""

#: music_dl/__main__.py:97
msgid "搜索数量限制"
msgstr ""

#: music_dl/__main__.py:98
msgid "指定输出目录"
msgstr ""

#: music_dl/__main__.py:99
msgid "指定代理(如http://127.0.0.1:1087)"
msgstr ""

#: music_dl/__main__.py:100
msgid "对搜索结果去重和排序(默认不去重)"
msgstr ""

#: music_dl/__main__.py:101
msgid "详细模式"
msgstr ""

#: music_dl/core.py:46
msgid "下载音乐失败"
msgstr "Track-Download fehlgeschlagen"

#: music_dl/music.py:49
#, python-brace-format
msgid ""
" -> 来源: {idx}{source} #{id}\n"
" -> 歌曲: {title}\n"
" -> 歌手: {singer}\n"
" -> 专辑: {album}\n"
" -> 时长: {duration}\n"
" -> 大小: {size}MB\n"
" -> 比特率: {rate}\n"
" -> URL: {url} \n"
msgstr ""
" -> Quelle: {idx}{source} #{id}\n"
" -> Titel: {title}\n"
" -> Künstler: {singer}\n"
" -> Album: {album}\n"
" -> Länge: {duration}\n"
" -> Größe: {size}MB\n"
" -> Bewertung: {rate}\n"
" -> URL: {url} \n"

#: music_dl/music.py:132
#, python-brace-format
msgid "请求失败: {url}"
msgstr ""

#: music_dl/music.py:173
msgid "下载中..."
msgstr "Herunterladen..."

#: music_dl/music.py:179
#, python-brace-format
msgid "已保存到: {outfile}"
msgstr "Gespeichert in: {outfile}"

#: music_dl/music.py:182
msgid "下载音乐失败: "
msgstr "Track-Download fehlgeschlagen: "

#: music_dl/music.py:183
#, python-brace-format
msgid "URL: {url}"
msgstr "URL: {url}"

#: music_dl/music.py:184
#, python-brace-format
msgid "位置: {outfile}"
msgstr "Speicherort: {outfile}"

#~ msgid "Request failed: {url}"
#~ msgstr "Request fehlgeschlagen: {url}"
Loading

0 comments on commit 46766ae

Please sign in to comment.