From 0e7ce27b3c3b02486624e0691e38ed6850d00f7d Mon Sep 17 00:00:00 2001 From: IamFurina Date: Sat, 22 Feb 2025 19:38:19 +0800 Subject: [PATCH] =?UTF-8?q?Patch:=20=E6=9B=B4=E6=96=B0API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server.js b/server.js index e28fece..f454827 100644 --- a/server.js +++ b/server.js @@ -240,6 +240,18 @@ async function consturctServer(moduleDefs) { }) console.log('[OK]', decode(req.originalUrl)) + if (req.baseUrl === '/song/url/v1') { + const song = moduleResponse['body']['data'][0] + if (!song.url || [1, 4].includes(song.fee)) { + const match = require('@unblockneteasemusic/server') + const source = ['pyncmd', 'qq', 'migu', 'kuwo', 'kugou', 'bilibili'] + const { url } = await match(req.query.id, source) + song.url = url + song.freeTrialInfo = null // 对于Splayer来说,去除开通会员提示 + } + } + + const cookies = moduleResponse.cookie if (!query.noCookie) { if (Array.isArray(cookies) && cookies.length > 0) {