jsososo / migumusicapi Goto Github PK
View Code? Open in Web Editor NEW咪咕音乐 nodejs api
Home Page: https://jsososo.github.io/MiguMusicApi
咪咕音乐 nodejs api
Home Page: https://jsososo.github.io/MiguMusicApi
at /root/KO-ON-Bot-main/MiguMusicApi/dist/util/SongSaver.js:81:60
at Array.forEach (<anonymous>)
at SongSaver.query (/root/KO-ON-Bot-main/MiguMusicApi/dist/util/SongSaver.js:79:69)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /find (/root/KO-ON-Bot-main/MiguMusicApi/dist/routes/song.js:73:28)
at async func (/root/KO-ON-Bot-main/MiguMusicApi/dist/app.js:35:32)
import createError = require('http-errors');
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
error: Forever detected script exited with code: 1
网易云项目可以使用forever启动,但是migu的不行,我看migu是app.ts,我在全局安装ts-node的时候报错无法安装,是不是这个原因,我已经先安装了 typescript 但是一直提示我 `-- UNMET PEER DEPENDENCY typescript@>=2.7
npm WARN [email protected] requires a peer of typescript@>=2.7 but none was installed.
没安装上ts-node,在网上也找不到解决办法,大神知道怎么解决么
这个仓库是否还继续?
建议添加歌词滚动功能
http://api.migu.jsososo.com/song/url?id=3790007&cid=60054701923&needPic=1
返回:
{"result":100,"data":{"128k":"http://tyst.migu.cn/public/product5th/product34/2019/07/1822/2009年06月26日博尔普斯/标清高清/MP3_128_16_Stero/60054701923.mp3","320k":"http://tyst.migu.cn/public/product5th/product34/2019/07/1822/2009年06月26日博尔普斯/标清高清/MP3_320_16_Stero/60054701923.mp3","flac":"http://tyst.migu.cn/public/ringmaker01/n17/2017/07/无损/2009年06月26日博尔普斯/flac/晴天-周杰伦.flac"}}
pm2 start app.ts 报错:Interpreter /usr/lib/node_modules/pm2/node_modules/.bin/ts-node is NOT AVAILABLE in PATH. (type 'which /usr/lib/node_modules/pm2/node_modules/.bin/ts-node' to double check.)
有些歌曲并不能返回结果,
例如:1113136606
502 Bad Gateway
不知道能不能把ts 源代码调试的方法发一下。
前端新手,今天实验了半天ts代码的调试也没成功。
官网借口也无法使用 502
当搜索到了一个不存在的歌曲,返回结果缺少musics字段导致报错
search.ts 46行
result返回:{ keyword: '123213213213', pageNo: '1', success: true }
const ngrok = require('@ngrok/ngrok');
// Get your endpoint online
ngrok.connect({ addr: 3080, authtoken_from_env: true })
.then(listener => console.log(Ingress established at: ${listener.url()}
));
"scripts": {
"start": "npm run build && NGROK_AUTHTOKEN=xxxxx node bin/www"
const result = await request.send({
url: 'https://m.music.migu.cn/migu/remoting/scr_search_tag',
data: {
keyword,
pgc: pageNo,
rows: pageSize,
type: typeMap[query.type],
},
});
访问Migu Api会发生Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
(Accessing the MIGU API will happen Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client)
显示如下信息
rm -rf ./dist && tsc && tsc-alias && node build.js && cp -r -f ./views ./dist/views && cp -r -f ./public ./dist/public
'rm' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
Line 117 in 1236a12
访问专辑信息接口 /album?id=1003767159 的时候, 报错如下
name: cherrioFun(o).text()
^
TypeError: cherrioFun is not a function
at Node.<anonymous> (D:\Chaos\web\MiguMusicApi\routes\album.ts:28:15)
at initialize.each (D:\Chaos\web\MiguMusicApi\node_modules\cheerio\lib\api\traversing.js:553:26)
at Object.<anonymous> (D:\Chaos\web\MiguMusicApi\routes\album.ts:25:25)
at step (D:\Chaos\web\MiguMusicApi\routes\album.ts:32:23)
at Object.next (D:\Chaos\web\MiguMusicApi\routes\album.ts:13:53)
at fulfilled (D:\Chaos\web\MiguMusicApi\routes\album.ts:4:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
{
"result": 100,
"data": {
"list": [],
"totalPage": 1
}
}
{
"result": 100,
"data": {
"list": [],
"totalPage": 1
}
}
{
"result": 100,
"data": {
"list": [],
"totalPage": 1
}
}
服务是跑在阿里云的,目前搜索,歌单,专辑都正常,只有歌手相关的接口有问题
只能获取pic封面,播放地址获取不到,在util/SongUrl.js 54行打开控制台console.log(result.data);,没有输出。
url: 'http://music.migu.cn/v3/api/music/audioPlayer/getPlayInfo',
data: {
dataType: 2,
data: c,
secKey: f,
},
headers: {
referer: 'http://music.migu.cn/v3/music/player/audio'
}
});
console.log(result.data);
if (!result || result.msg !== '成功') {
return {};
}
const obj = {};
const sizeMap = {
bqPlayInfo: '128k',
hqPlayInfo: '320k',
sqPlayInfo: 'flac',
};```
起初提示找不到解释器,后来指定ts-node后提示启动成功,但实际访问失败,只有用npm命令直接运行才可,但需要持久运行就很麻烦,如何处理?
如题,请求报错Access to XMLHttpRequest at 'http://10.10.1.134:3400/search' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
axios添加请求头还是无法解决
问一嘴,sosomusic的电脑版 接口什么时候断开?
出错了呀,{"result":400,"errMsg":"系统异常:Unexpected end of JSON input"},看看什么问题哈
/search?keywords=xx
{"result":400,"errMsg":"系统异常:read ECONNRESET"}
报错了呀
有时候会出现获取失败,可能是咪咕服务器的原因
歌词获取不到啦!!!!2023.09
wget MiguMusicApi
cd MiguMusicApi
npm install
npm start
启动之后手动访问可以返回,但是我在本地架设了NeteaseMusic前端之后并没有连上Api后台
我看了NeteaseMusic中的教程,但是设置不成功,能不能稍微详细的讲一下
Error: Cannot find module '../app'
Require stack:
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.