Git Product home page Git Product logo

qqmusicapi's People

Contributors

13078417792 avatar aniki-16x16 avatar dependabot[bot] avatar jsososo avatar lynnguo666 avatar wakefun avatar xiaou66 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qqmusicapi's Issues

功能

有没有方法可以下载无损音质的音乐

请求歌曲链接返回400错误

/song/url?id=000zEdAk359qlo
返回{"result":400,"errMsg":"获取播放链接出错"}

是无法请求到资源嘛...
/(ㄒoㄒ)/~~

本地部署出现播放地址无法获取

大佬您好
我在部署您的QQ音乐的API node
在获取播放地址的时候出现
GET /song/urls?id=0039MnYb0qxYhV,004Z8Ihr0JIu5s - - ms - - (node:19428) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'data' of undefined at reqFun (C:\Users\xiaou\Desktop\QQMusicApi-master\routes\song.js:146:22) at process._tickCallback (internal/process/next_tick.js:68:7) (node:19428) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) GET /song/urls?id=0039MnYb0qxYhV,004Z8Ihr0JIu5s - - ms - -
如果您有空希望告知一下是什么问题

获取图片404

使用

"https://y.gtimg.cn/music/photo_new/T002R300x300M000" + mid

按照文档将 mid 改好后接口返回404了

用git部署到服务器上,获取下载连接总是返回400错误

用/song/url返回的总是400错误
用/song/urls直接就报错
(node:4660) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'data' of undefined
at reqFun (C:\Program\QQMusicApi\routes\song.js:146:22)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async getUrls (C:\Program\QQMusicApi\routes\song.js:152:5)
(node:4660) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
想问问到底是什么问题

请教设置cookie的方法

您好,首选感谢您的开源分享。有个问题想请教一下,我看源码里面有一个使用POST方法在body中传入cookie的方式来设置全局的cookie,我用PostMan试着传入了QQ音乐的cookie的值,但是每次都会返回

Cannot read property 'split' of undefined

TypeError: Cannot read property 'split' of undefined
    at router.post (/root/git/QQMusicApi/routes/user.js:18:8)

应该是传入的参数格式有问题,所以想请问一下,在body中传入的格式是什么样的呀(这方面我接触的少,不太懂,勿见怪) 我在传参的时候是这么做的 : 在body中添加: pgv_pvid=XXXX; ts_uid=XXXX ...

如何自动更新 cookies

我是通过 https://y.qq.com/ 登录 qq 来获取 cookies 的。对于获取音频链接,qqmusic_key 应该是关键,但是这个值只有一天的有效性,过期后无法再获取 flac 的链接。
请问我该如何自动更新 cookies,而不需要每天都登录一次再手动添加 cookies。

歌曲信息接口 /song 批量获得

您好,非常棒的项目!

但是我发现/song这一接口的扩展性不是很好,不能批量获得多个mid的歌曲信息。请问能否完善此接口?十分感谢!

git 部署后部分router报错

您好,我尝试在nas和电脑端克隆项目后使用npm start 命令运行,song/find 等几个get 都会报错,刚好就是需要这几个接口,我刚学node js,还比较小白,不知道怎么解决这个问题。。node版本是12.14.
image

-

问题已解决

一点小建议

我粗略的阅读了您的代码, 发现代码质量非常好, 对于几个地方,我有些疑问, 或者说也算是建议吧
1. 每次运行npm start的时候都会输出node ./bin/www, 然后就没有了. 这样开发者也许不知道服务器初始化完成了没有. 我觉得如果在'debug('Listening on ' + bind);' 后面加上 console.log("server is running on ", addr.port) 会更好.每次初始化完成都会打印监听的端口号,这样开发者既能知道服务器初始化完成,可以访问了,也能提示当前监听的端口

2. 关于logger, 我看用到了const logger = require('morgan'), 但是这日志仅是

HTTP request logger middleware for node.js

如果开发或运维想查看服务器的运行log文件的话, 比如,检查服务器的响应结果,或者服务器运行过程中有没有报错等

3. 关于

dataHandle[func](ip, type);
res.send({
result: 100,
data: '就当成功了吧',
})

我觉得写一个回调给dataHandle, 在回调里运行'就当成功了吧'可能会更严谨.

4. 文中多次出现类似这种连环取属性的操作result.gedan.data.vec_gedan, 严格意义上来讲是不严谨, 正确的写法应该是
if(result && result.gedan && result.gedan.data && result.gedan.data.vec_gedan ){ ... } else { console.log('give some tips') }
当然,我们可以写一个函数来判断对象是否具有这些多层属性

5. 最后一点, 是我个人的编程军规: feedback.js line 19
我是很反对这种写法的console.log(val, this.data);, 因为当别人看到这条log的时候,不知道这条log是什么意思,,只能看到变量的结果. 规范的写法应该是console.log('feedback add val', val, "this.data", this.data);, 这样的话,别人看到就知道这条log是feedback文件里的,在add方法里,打印的两个变量的含义分别是valuethis.data. 尤其是在日志文件里检查log,非常有用

在下才疏学浅,没有过多研究和调试,如有误解,欢迎指正

配置好一切后,传入会员Cookie也不能获取付费音质链接的解决办法

问题还原:
在我配置完并传入Cookie后,并没有像预料的那样获取到付费歌曲以及无损音质,在我细(暴)心(怒)排查后,发现我的Cookie里面uin一项也就是QQ号,神奇的在前面多了一个字母 “o” 。
好的,找到问题,接下来就好办了,用postman手动post自己修改后(去掉字母 “o” )的Cookie,再测试就已经完美运行了,奈斯。
目前并不清楚是不是只有我个人出现了这个问题,貌似作者和其他使用者都挺正常的。

api安装出错

你好,今天我在尝试安装你的api服务,但是装不上,能帮忙看下么,非常感谢
` [email protected] start /root/QQMusicApi

node ./bin/www

/root/QQMusicApi/app.js:51
...req.query,
^^^

SyntaxError: Unexpected token ...
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/root/QQMusicApi/bin/www:7:11)

npm ERR! Linux 3.10.0-1062.4.1.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.17.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: node ./bin/www
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node ./bin/www'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the qqmusicapi package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/www
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs qqmusicapi
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls qqmusicapi
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/QQMusicApi/npm-debug.log`

[求助] POST不了

POST提示
{"result":400,"errMsg":"自己起一个 node 服务 这么难???"}
我是在自己的服务器上搭建的

你好,请教一下如何把这个项目在服务器中升级为https访问呢?

不太懂node和服务器这块的,见谅,查了不少资料,node js 开启https服务,需要域名、服务器、SSL证书,这些我都有,想请问一下,如何在你这个项目中开启https服务呢?

我看你的这个测试网址也是支持https请求的,所以想请教一下,你的https是在项目中设置的嘛?需要在项目中配置什么呢? 谢谢啦

关于部分无损返回404链接

因为有些无损返回的链接是404,然后我看了一下代码,在获取vkey时 filename 用的是 mid,而不是 media_mid,所以返回的链接是404,比如这首歌:https://api.qq.jsososo.com/song/url?id=003u9Xfg0KLHNF&type=flac
应该先通过 https://c.y.qq.com/v8/fcg-bin/fcg_play_single_song.fcg?songmid=003u9Xfg0KLHNF&platform=yqq&format=json 获取 media_mid,再用 media_mid 拼出 filename 才能获取到正确的vkey。
完整拼接:http://c.y.qq.com/base/fcgi-bin/fcg_music_express_mobile3.fcg?g_tk=1722049047&loginUin=956581739&needNewCode=0&cid=205361747&uin=323&songmid=003u9Xfg0KLHNF&filename=F000002pcmA1DrDOG.flac&guid=999
这里 songmid=003u9Xfg0KLHNF,filename=F000002pcmA1DrDOG.flac
不知道我表述的是否清楚哈

关于示例接口限流通知

承蒙各位的喜欢,最近网站的uv与之前相比有了巨大的提升,同时也带来了非常大的服务器负载和流量开销,后续可能会慢慢缩紧高频ip的限制、其他应用对示例接口访问甚至是对示例网站的测试接口进行限流,也非常希望喜欢这个项目的同学可以自行git clone 搭建 node 项目。

原始请求接口

这个版本很棒,想问下有没有原始请求接口,想改造成其他语言的

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.