mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 09:28:29 +00:00
fix clientid error
This commit is contained in:
parent
4f20693f9e
commit
2b9e8d7644
@ -41,7 +41,7 @@
|
||||
"set-cookie-parser": "2.6.0",
|
||||
"undici": "^5.19.1",
|
||||
"url-pattern": "1.0.3",
|
||||
"youtubei.js": "^11.0.1",
|
||||
"youtubei.js": "^12.2.0",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
|
@ -88,7 +88,17 @@ const cloneInnertube = async (customFetch) => {
|
||||
const oauthData = transformSessionData(cookie);
|
||||
|
||||
if (!session.logged_in && oauthData) {
|
||||
await session.oauth.init(oauthData);
|
||||
const tokensMod = {
|
||||
...oauthData, // 复制 oauthData 中的所有属性
|
||||
client: {
|
||||
client_id: oauthData.client_id,
|
||||
client_secret: oauthData.client_secret
|
||||
}
|
||||
};
|
||||
delete tokensMod.client_id;
|
||||
delete tokensMod.client_secret;
|
||||
|
||||
await session.oauth.init(tokensMod);
|
||||
session.logged_in = true;
|
||||
}
|
||||
|
||||
@ -140,7 +150,7 @@ export default async function(o) {
|
||||
|
||||
let info;
|
||||
try {
|
||||
info = await yt.getBasicInfo(o.id, useHLS ? 'IOS' : 'ANDROID');
|
||||
info = await yt.getBasicInfo(o.id, useHLS ? 'IOS' : 'WEB');
|
||||
} catch (e) {
|
||||
if (e?.info) {
|
||||
const errorInfo = JSON.parse(e?.info);
|
||||
|
@ -62,8 +62,8 @@ importers:
|
||||
specifier: 1.0.3
|
||||
version: 1.0.3
|
||||
youtubei.js:
|
||||
specifier: ^11.0.1
|
||||
version: 11.0.1
|
||||
specifier: ^12.2.0
|
||||
version: 12.2.0
|
||||
zod:
|
||||
specifier: ^3.23.8
|
||||
version: 3.23.8
|
||||
@ -1555,8 +1555,8 @@ packages:
|
||||
jackspeak@3.4.3:
|
||||
resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==}
|
||||
|
||||
jintr@3.1.0:
|
||||
resolution: {integrity: sha512-azhCHApkRfBH8INpiUCwKBYaNCdB5G+x3NApsI2MxQXSlgFAx7rap3YwE3JAkN08GO8f3ilZsGB0Yvc+412ntQ==}
|
||||
jintr@3.2.0:
|
||||
resolution: {integrity: sha512-psD1yf05kMKDNsUdW1l5YhO59pHScQ6OIHHb8W5SKSM2dCOFPsqolmIuSHgVA8+3Dc47NJR181CXZ4alCAPTkA==}
|
||||
|
||||
joycon@3.1.1:
|
||||
resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==}
|
||||
@ -2354,8 +2354,8 @@ packages:
|
||||
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
youtubei.js@11.0.1:
|
||||
resolution: {integrity: sha512-ZsbOd+5XF2Ofi3FrLMfYd+f9g9H8xswlouFhjhOqbwT68dMJtX6CRGsHNj5VTFCR/+L/865x1lnUlllB2dDDTA==}
|
||||
youtubei.js@12.2.0:
|
||||
resolution: {integrity: sha512-G+50qrbJCToMYhu8jbaHiS3Vf+RRul+CcDbz3hEGwHkGPh+zLiWwD6SS+YhYF+2/op4ZU5zDYQJrGqJ+wKh7Gw==}
|
||||
|
||||
zod@3.23.8:
|
||||
resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==}
|
||||
@ -3639,7 +3639,7 @@ snapshots:
|
||||
optionalDependencies:
|
||||
'@pkgjs/parseargs': 0.11.0
|
||||
|
||||
jintr@3.1.0:
|
||||
jintr@3.2.0:
|
||||
dependencies:
|
||||
acorn: 8.12.1
|
||||
|
||||
@ -4337,10 +4337,10 @@ snapshots:
|
||||
|
||||
yocto-queue@0.1.0: {}
|
||||
|
||||
youtubei.js@11.0.1:
|
||||
youtubei.js@12.2.0:
|
||||
dependencies:
|
||||
'@bufbuild/protobuf': 2.2.3
|
||||
jintr: 3.1.0
|
||||
jintr: 3.2.0
|
||||
tslib: 2.6.3
|
||||
undici: 5.28.4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user