qiuchenlyopensource / musicdownload Goto Github PK
View Code? Open in Web Editor NEW歌曲下载
License: GNU General Public License v3.0
歌曲下载
License: GNU General Public License v3.0
As the title suggests, add a option to download based on link (album or single). Search function works great, but this would make everything easier and faster to download whole albums instead of individual tracks.
Example of input:
Input letter "L" for link (similar to how "S" is search) > input link (ex: https://y.qq.com/n/ryqq/albumDetail/003qGXqG4WmYDA).
如标题所示,添加基于链接(专辑或单曲)下载的选项。 搜索功能效果很好,但这将使下载整个专辑而不是单个曲目的一切变得更容易和更快。
输入示例:
链接输入字母“L”(类似于搜索“S”的方式)>输入链接(例如:https://y.qq.com/n/ryqq/albumDetail/003qGXqG4WmYDA)。
再次抱歉翻译,我正在使用谷歌:)
PS D:\Github\QQFlacMusicDownloader> python.exe .\MainServer.py
kw_token已生成 GWD5PD3QZE4
操作系统 Microsoft Windows 10 专业版 (64位)
操作步骤 1把下载好的代码文件放到"D:/Downloads/QQFlacMusicDownloader-master/"路径下
操作步骤 2在文件夹空白处按住shift+鼠标右击,点击"在此处打开PowerShell"
操作步骤 3执行指令"pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple"
操作步骤 4执行指令"pip3 install -r requirements.txt "
操作步骤 5执行指令"python MainServer.py"
操作步骤 6用Google Chrome打开"http://127.0.0.1:8899/",出现了网页标题,但是网页空白
之前按照以上方法可行,但是昨天网页突然就空白了,尝试过重新安装[Python3.11.2]https://www.python.org/ftp/python/3.11.2/python-3.11.2-amd64.exe)和重新解压代码文件但无济于事
第一次发Issues不知道还有没有什么遗漏的,感谢原作者分享思路。
requests.exceptions.ConnectionError: HTTPConnectionPool(host='8.136.185.193', port=80):
如题,一般什么问题造成的啊?谢谢
docker部署怎么设置本地路径,下载的音乐只会docker里面。比如设置/root/123,就会在docker根目录建立/root/123,如何在docker以外保存音乐?
https://y.qq.com/n/ryqq/playlist/8476553848
类似这种别人整理好的歌曲,想全部下载下来,辛苦您啦,邱哥。
问题:
运行MainServer 后 浏览器访问http://127.0.0.1:8899, 命令行窗口出现 302 与 304 错误, 浏览器成功跳转至index.html但没有正常页面显示。
环境:
复现方法:
clone本项目后在根目录运行以下指令
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install -r requirements.txt
python MainServer.py
在chrome中访问http://127.0.0.1:8899
exception calling callback for <Future at 0x7f5600acb6a0 state=finished raised OSError>
Traceback (most recent call last):
File "/home/lyle/miniconda3/envs/music/lib/python3.10/concurrent/futures/_base.py", line 342, in _invoke_callbacks
callback(self)
File "/opt/QQFlacMusicDownloader/flaskSystem/App.py", line 85, in done
ret = ret.result()
File "/home/lyle/miniconda3/envs/music/lib/python3.10/concurrent/futures/_base.py", line 451, in result
return self.__get_result()
File "/home/lyle/miniconda3/envs/music/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/home/lyle/miniconda3/envs/music/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/QQFlacMusicDownloader/flaskSystem/src/Common/Tools.py", line 256, in downSingle
with open(localFile, 'wb') as code:
OSError: [Errno 36] File name too long: '/xxxxxx/Wiener Philharmoniker/Wiener Philharmoniker - Symphony No. 9 in D Minor, WAB 109 - Edition: Leopold Nowak - Bruckner: Symphony No. 9 in D Minor, WAB 109 - Edition: Leopold Nowak - III. Adagio. Langsam, feierlich (D小调第9号交响曲 - 第三乐章 柔板,非常缓慢,庄严的) (Live).mp3'
qq 音乐 有希望支持下载臻品母带音质吗?期待
手机端也可以正常使用,只是网易云音乐接口不能下载
下载酷我音乐音频时,下载下来类似“请在最新版手机端查看此音乐”的提示音频。
相关日志如下
2023/06/05 06:51:29 | stdout | 192.168.123.164 - - [04/Jun/2023 22:51:29] "GET /getConfig HTTP/1.1" 200 -
2023/06/05 06:51:29 | stdout | 192.168.123.164 - - [04/Jun/2023 22:51:29] "�[36mGET /assets/index-77d4dafe.css HTTP/1.1�[0m" 304 -
2023/06/05 06:51:29 | stdout | 192.168.123.164 - - [04/Jun/2023 22:51:29] "�[36mGET /assets/index-1d4497e6.js HTTP/1.1�[0m" 304 -
2023/06/05 06:51:29 | stdout | 192.168.123.164 - - [04/Jun/2023 22:51:29] "�[36mGET /index.html HTTP/1.1�[0m" 304 -
2023/06/05 06:51:23 | stdout | �[33mPress CTRL+C to quit�[0m
2023/06/05 06:51:23 | stdout | * Running on http://192.168.123.80:8899
2023/06/05 06:51:23 | stdout | * Running on http://127.0.0.1:8899
2023/06/05 06:51:23 | stdout | * Running on all addresses (0.0.0.0)
2023/06/05 06:51:23 | stdout | �[31m�[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.�[0m
2023/06/05 06:51:23 | stdout | * Debug mode: off
2023/06/05 06:51:23 | stdout | * Serving Flask app 'flaskSystem.App'
2023/06/05 06:51:23 | stdout | kw_token已生成 I35ZTSOYGK
QQ音乐源下载无损音乐,点击下载提示提交任务成功,但是下载列表没有。
当前docker部署,只映射了本地文件夹没改动其他任何配置
docker日志只看到了请求日志,没有其他异常日志
127.0.0.1 - - [12/Mar/2023 21:34:38] "OPTIONS /wyy/search/4919447/1/30 HTTP/1.1" 200 -
[2023-03-12 21:34:39,334] ERROR in app: Exception on /wyy/search/4919447/1/30 [GET]
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\site-packages\flask\app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
File "C:\Program Files\Python310\lib\site-packages\flask\app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Program Files\Python310\lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Program Files\Python310\lib\site-packages\flask\app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Program Files\Python310\lib\site-packages\flask\app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "D:\server\paths\QQFlacMusicDownloader\web\API\es.py", line 68, in essearch
lst = netes.searchMusic(
File "D:\server\paths\QQFlacMusicDownloader\src\Api\Netease.py", line 302, in searchMusic
for li in result['songs']:
KeyError: 'songs'
127.0.0.1 - - [12/Mar/2023 21:34:39] "GET /wyy/search/4919447/1/30 HTTP/1.1" 500 -
搜索p:8908273546出现共搜索到1条数据,但是过滤后没有发现符合条件的数据。请检查搜索过滤条件是否设置正确。
但是没有任何配置
配置
{
"firstOpen": false,
"token": "simulate load custom token",
"searchHistory": [
"p:8908273546"
],
"lastSearch": "p:8908273546",
"filterKeys": [
],
"config": {
"onlyMatchSearchKey": false,
"ignoreNoAlbumSongs": false,
"classificationMusicFile": false,
"disableFilterKey": false,
"concurrency": {
"num": 16,
"downloadFolder": "/music/"
},
"platform": "qq"
},
"netease": {
"isLogin": false,
"token": "",
"anonimousCookie": "",
"user": {}
}
}
Traceback (most recent call last):
File "MainServer.py", line 11, in
from web.API.es import init as es # 下面无需顺序
File "D:\QQFlacMusicDownloader\web\API\es.py", line 8, in
from src.Api.Netease import Netease
File "D:\QQFlacMusicDownloader\src\Api\Netease.py", line 11, in
from src.Api.BaseApi import BaseApi
File "D:\QQFlacMusicDownloader\src\Api\BaseApi.py", line 12, in
class BaseApi(abc.ABC):
File "D:\QQFlacMusicDownloader\src\Api\BaseApi.py", line 14, in BaseApi
def search(self, searchKey: str) -> list[Songs]:
TypeError: 'type' object is not subscriptable
没有看明白这块怎么调用的,不知道是什么错误
在腾讯云linux上运行后 远程访问,发现网易云不能扫码登陆.,请问下除了8899是否有其他端口需要放行。
qq 音乐 有希望支持下载臻品母带音质吗?期待
我的电脑是Windows 10,安装了官网最新的python。然后按着您的说明一步一步操作,都成功了,没有报错。
到了最后的这一步:执行python3 MainServer.py命令(回车后cmd窗口无任何反馈),chrome浏览器访问 http://localhost:8899/ ,会提示“localhost 拒绝了我们的连接请求 ERR_CONNECTION_REFUSED”。请问这是怎么回事
Hello, great tool. If track has special characters that cannot be added in Windows file names, like " \ / : * ? " < > | " will break the ripper. Quick example try to grab What Do You Mean? (Remix) by Justin Bieber.
A fix would be that the ripper to exclude those characters. Thank you!
你好,很棒的工具。 如果 track 有不能添加到 Windows 文件名中的特殊字符,例如“\ / : * ?” < > | “将打破开膛手。快速示例尝试抓取 Justin Bieber 的 What Do You Mean? (Remix)。
解决方法是让开膛手排除这些字符。 谢谢!对不起中文不好,正在使用翻译:)
搜了个歌,单独下载都返回403。 本地搜了一下,没发现config文件, 怎么绑定cookie的啊大佬
RT
我刚刚发现小米的电脑开机之后小米的某些后台服务会占用8899端口号,是否可以考虑更换到其他端口号去呢?比如18899之类的
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 852, in validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 340, in connect
ssl_context=context)
File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 332, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/lib/python3.6/ssl.py", line 817, in init
self.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer
代码为最新版本
依赖均为最新版本
日志:
0502.txt
docker run -p 127.0.0.1:8899:8899 -v 本地目录:/workspace/music -it dockerimage:latest
docker-compose的是
volumes:
- 本地目录:/workspace/music
比如说要下载的的AmaLee - Hacking to the Gate (from "Steins;Gate")
中间出现了;
和"
,有可能是这些中断了保存进程。
exception calling callback for <Future at 0x1cc885a5a20 state=finished raised OSError>
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\concurrent\futures\_base.py", line 329, in _invoke_callbacks
callback(self)
File "D:\server\paths\QQFlacMusicDownloader\web\App.py", line 87, in done
ret = ret.result()
File "C:\Program Files\Python310\lib\concurrent\futures\_base.py", line 438, in result
return self.__get_result()
File "C:\Program Files\Python310\lib\concurrent\futures\_base.py", line 390, in __get_result
raise self._exception
File "C:\Program Files\Python310\lib\concurrent\futures\thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "D:\server\paths\QQFlacMusicDownloader\src\Common\Tools.py", line 245, in downSingle
with open(localFile, 'wb') as code:
OSError: [Errno 22] Invalid argument: 'D:\\server\\paths\\QQFlacMusicDownloader/music/AmaLee/AmaLee - Hacking to the Gate (from "Steins;Gate").flac'
windows下将以下代码:
localFile = f"{it['singer']} - {it['title']}.{it['extra']}".replace(
"/", "\\")
localLrcFile = f"{it['singer']} - {it['title']}.lrc".replace(
"/", "\\")
mShower = localFile
my_path = download_home+it['singer']+'/'
if not onlyShowSingerSelfSongs:
if not os.path.exists(my_path):
os.mkdir(f"{my_path}")
my_path = f"{my_path}{it['album']}"
if not os.path.exists(my_path):
os.mkdir(f"{my_path}")
localFile = os.path.join(my_path, f"{localFile}")
localLrcFile = os.path.join(my_path, f"{localLrcFile}")
替换为:
localFile = f"{it['singer']} - {it['title']}.{it['extra']}".replace(
"/", ",")
localLrcFile = f"{it['singer']} - {it['title']}.lrc".replace(
"/", ",")
localFile = localFile.replace('|','')
localLrcFile=localLrcFile.replace('|','')
mShower = localFile
my_path = download_home+it['singer']+'\\'
my_path = my_path.replace('"','')
my_path = my_path.replace("'",'')
my_path = my_path.replace('|','')
my_path = my_path.replace('*','')
my_path = my_path.replace('?','')
my_path = my_path.replace('<','')
my_path = my_path.replace('>','')
my_path = my_path.replace('/', '-')
if not onlyShowSingerSelfSongs:
if not os.path.exists(my_path):
os.mkdir(f"{my_path}")
my_path = f"{my_path}{it['album']}"
my_path = my_path.replace('"','')
my_path = my_path.replace("'",'')
my_path = my_path.replace('|','')
my_path = my_path.replace('*','')
my_path = my_path.replace('?','')
my_path = my_path.replace('<','')
my_path = my_path.replace('>','')
my_path = my_path.replace('.', '')
my_path = my_path.replace('/', '-')
if not os.path.exists(my_path):
os.mkdir(f"{my_path}")
localFile = os.path.join(my_path, f"{localFile}")
localLrcFile = os.path.join(my_path, f"{localLrcFile}")
解决一些歌曲无法下载的问题
如题,下载下来的文件能不能不按演唱者建立文件夹?
而是直接将所有的曲目、歌词放在一个文件夹里。
main.py里面的
filterList = params.get('filterList',
['DJ', 'Remix', '即兴', '变调', 'Live', '伴奏', '版,', '版)', '慢四', "纯音乐", '二胡',
'串烧', '现场'])
使得搜索结果里带“版”字的歌曲都被过滤了,但是有些歌曲并不是现场版或DJ版,而是完整版、新版、重录版之类的,也被一并过滤掉了,filterList这一段删了也没用
几百首,一首一首的点有点崩溃 233
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.