Files
MusicServer/sdk/qs/index.ts
T
snowy-yang 0f9cff2a08 feat(qs): 汽水音乐平台接入——匿名搜索/试听、抖音扫码登录、解密流代理
- sdk/qs 平台模块(安卓参数指纹匿名搜索)+ sdk/apis/qs 取流:
  匿名 30s 试听,登录态走签名 track_v2 + spade key AES-CTR 解密
- /login/qs/qr 抖音扫码登录(授权后 sessionid 解锁完整曲目)
- /stream/qs/:id 解密流代理,/url 返回的相对地址按请求 host 补全
- 回归测试覆盖 kw 双通道(VIP 真音频/降级链)与 qs 试听;start.bat 去掉
  SOURCE_ENABLED 直启
2026-10-01 22:43:49 +08:00

31 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 汽水音乐(字节跳动)平台模块
// 匿名可用面(2026-10-01 实测):搜索 / 曲目信息 / 歌词 / 封面 / 30 秒试听取流(未加密直链)。
// 登录态(/login/qs/qr 抖音扫码):设备注册 + X-Argus/X-Ladon 自签走 /luna/pc/track_v2,
// 加密音频服务端解密后经 /stream/qs/:id 代理回明文流(完整曲目,2026-10-01 全链路实测)
import qsApi, { getStreamBuffer } from '../apis/qs.ts'
import getLyric from './lyric.ts'
import getMusicInfo, { coverUrl } from './musicInfo.ts'
import musicSearch from './musicSearch.ts'
const qs = {
musicSearch,
getMusicUrl(songInfo, type) {
return qsApi.getMusicUrl(songInfo, type)
},
// 明文音频 Buffer(/stream/qs/:id 代理端点消费)
getStreamBuffer(trackId: string) {
return getStreamBuffer(trackId)
},
getLyric(songInfo) {
return getLyric(songInfo.songmid)
},
getPic(songInfo) {
return getMusicInfo(songInfo.songmid).promise.then(body => coverUrl(body?.seo_track?.track?.album))
},
getMusicDetailPageUrl(songInfo) {
return `https://music.douyin.com/qishui/share/track?track_id=${songInfo.songmid}`
},
}
export default qs