Skip to content

Commit

Permalink
fix: 修复设置 cookie 也不能获取 vip 歌曲下载链接 Rain120#91 Rain120#49
Browse files Browse the repository at this point in the history
  • Loading branch information
ctaoist committed Sep 2, 2024
1 parent 9444148 commit 6439cc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion module/apis/u_common.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
const request = require('../../util/request');
const config = require('../config');
const userInfoConfig = require('../../config/user-info');

module.exports = ({ options = {}, method = 'get' }) => {
let opts = Object.assign(options, config.commonParams, {
headers: {
referer: 'https://y.qq.com/portal/player.html',
host: 'u.y.qq.com',
'content-type': 'application/x-www-form-urlencoded',
'cookie': userInfoConfig.cookie,
},
});
console.log('https://u.y.qq.com/cgi-bin/musicu.fcg', {opts})
console.log('https://u.y.qq.com/cgi-bin/musicu.fcg', { opts })
return request('https://u.y.qq.com/cgi-bin/musicu.fcg', method, opts, 'u');
};

0 comments on commit 6439cc9

Please sign in to comment.