mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 01:18:27 +00:00
修改b站下载的bug
This commit is contained in:
parent
5275895401
commit
d04f9a8558
@ -42,13 +42,10 @@ async function com_download(id) {
|
||||
const [ video, audio ] = extractBestQuality(streamData.data.dash);
|
||||
if (!video || !audio) {
|
||||
return { error: "fetch.empty" };
|
||||
}
|
||||
|
||||
return {
|
||||
} return {
|
||||
urls: [video.baseUrl, audio.baseUrl],
|
||||
audioFilename: `bilibili_${id}_audio`,
|
||||
filename: `bilibili_${id}_${video.width}x${video.height}.mp4`,
|
||||
isHLS: true
|
||||
filename: `bilibili_${id}_${video.width}x${video.height}.mp4`
|
||||
};
|
||||
}
|
||||
|
||||
|
273
pnpm-lock.yaml
273
pnpm-lock.yaml
@ -28,11 +28,8 @@ importers:
|
||||
dotenv:
|
||||
specifier: ^16.0.1
|
||||
version: 16.4.5
|
||||
esbuild:
|
||||
specifier: ^0.14.51
|
||||
version: 0.14.54
|
||||
express:
|
||||
specifier: ^4.21.1
|
||||
specifier: ^4.21.2
|
||||
version: 4.21.2
|
||||
express-rate-limit:
|
||||
specifier: ^7.4.1
|
||||
@ -46,12 +43,12 @@ importers:
|
||||
ipaddr.js:
|
||||
specifier: 2.2.0
|
||||
version: 2.2.0
|
||||
mime:
|
||||
specifier: ^4.0.4
|
||||
version: 4.0.4
|
||||
nanoid:
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2
|
||||
node-cache:
|
||||
specifier: ^5.1.2
|
||||
version: 5.1.2
|
||||
specifier: ^5.0.9
|
||||
version: 5.1.5
|
||||
set-cookie-parser:
|
||||
specifier: 2.6.0
|
||||
version: 2.6.0
|
||||
@ -62,8 +59,8 @@ importers:
|
||||
specifier: 1.0.3
|
||||
version: 1.0.3
|
||||
youtubei.js:
|
||||
specifier: ^12.2.0
|
||||
version: 12.2.0
|
||||
specifier: ^13.4.0
|
||||
version: 13.4.0
|
||||
zod:
|
||||
specifier: ^3.23.8
|
||||
version: 3.23.8
|
||||
@ -336,12 +333,6 @@ packages:
|
||||
cpu: [ia32]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-loong64@0.14.54':
|
||||
resolution: {integrity: sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-loong64@0.21.5':
|
||||
resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==}
|
||||
engines: {node: '>=12'}
|
||||
@ -960,10 +951,6 @@ packages:
|
||||
resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
|
||||
engines: {node: '>= 8.10.0'}
|
||||
|
||||
clone@2.1.2:
|
||||
resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==}
|
||||
engines: {node: '>=0.8'}
|
||||
|
||||
cluster-key-slot@1.1.2:
|
||||
resolution: {integrity: sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@ -1124,131 +1111,6 @@ packages:
|
||||
es6-promise@3.3.1:
|
||||
resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==}
|
||||
|
||||
esbuild-android-64@0.14.54:
|
||||
resolution: {integrity: sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
|
||||
esbuild-android-arm64@0.14.54:
|
||||
resolution: {integrity: sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
esbuild-darwin-64@0.14.54:
|
||||
resolution: {integrity: sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
esbuild-darwin-arm64@0.14.54:
|
||||
resolution: {integrity: sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
esbuild-freebsd-64@0.14.54:
|
||||
resolution: {integrity: sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
esbuild-freebsd-arm64@0.14.54:
|
||||
resolution: {integrity: sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [freebsd]
|
||||
|
||||
esbuild-linux-32@0.14.54:
|
||||
resolution: {integrity: sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [ia32]
|
||||
os: [linux]
|
||||
|
||||
esbuild-linux-64@0.14.54:
|
||||
resolution: {integrity: sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
esbuild-linux-arm64@0.14.54:
|
||||
resolution: {integrity: sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
esbuild-linux-arm@0.14.54:
|
||||
resolution: {integrity: sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
esbuild-linux-mips64le@0.14.54:
|
||||
resolution: {integrity: sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [mips64el]
|
||||
os: [linux]
|
||||
|
||||
esbuild-linux-ppc64le@0.14.54:
|
||||
resolution: {integrity: sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
|
||||
esbuild-linux-riscv64@0.14.54:
|
||||
resolution: {integrity: sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
|
||||
esbuild-linux-s390x@0.14.54:
|
||||
resolution: {integrity: sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
|
||||
esbuild-netbsd-64@0.14.54:
|
||||
resolution: {integrity: sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [netbsd]
|
||||
|
||||
esbuild-openbsd-64@0.14.54:
|
||||
resolution: {integrity: sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [openbsd]
|
||||
|
||||
esbuild-sunos-64@0.14.54:
|
||||
resolution: {integrity: sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [sunos]
|
||||
|
||||
esbuild-windows-32@0.14.54:
|
||||
resolution: {integrity: sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
|
||||
esbuild-windows-64@0.14.54:
|
||||
resolution: {integrity: sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
esbuild-windows-arm64@0.14.54:
|
||||
resolution: {integrity: sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
esbuild@0.14.54:
|
||||
resolution: {integrity: sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==}
|
||||
engines: {node: '>=12'}
|
||||
hasBin: true
|
||||
|
||||
esbuild@0.21.5:
|
||||
resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==}
|
||||
engines: {node: '>=12'}
|
||||
@ -1555,8 +1417,8 @@ packages:
|
||||
jackspeak@3.4.3:
|
||||
resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==}
|
||||
|
||||
jintr@3.2.0:
|
||||
resolution: {integrity: sha512-psD1yf05kMKDNsUdW1l5YhO59pHScQ6OIHHb8W5SKSM2dCOFPsqolmIuSHgVA8+3Dc47NJR181CXZ4alCAPTkA==}
|
||||
jintr@3.3.1:
|
||||
resolution: {integrity: sha512-nnOzyhf0SLpbWuZ270Omwbj5LcXUkTcZkVnK8/veJXtSZOiATM5gMZMdmzN75FmTyj+NVgrGaPdH12zIJ24oIA==}
|
||||
|
||||
joycon@3.1.1:
|
||||
resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==}
|
||||
@ -1715,9 +1577,9 @@ packages:
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
hasBin: true
|
||||
|
||||
nanoid@4.0.2:
|
||||
resolution: {integrity: sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==}
|
||||
engines: {node: ^14 || ^16 || >=18}
|
||||
nanoid@5.1.5:
|
||||
resolution: {integrity: sha512-Ir/+ZpE9fDsNH0hQ3C68uyThDXzYcim2EqcZ8zn8Chtt1iylPT9xXJB0kPCnqzgcEGikO9RxSrh63MsmVCU7Fw==}
|
||||
engines: {node: ^18 || >=20}
|
||||
hasBin: true
|
||||
|
||||
natural-compare@1.4.0:
|
||||
@ -1727,10 +1589,6 @@ packages:
|
||||
resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
|
||||
engines: {node: '>= 0.6'}
|
||||
|
||||
node-cache@5.1.2:
|
||||
resolution: {integrity: sha512-t1QzWwnk4sjLWaQAS8CHgOJ+RAfmHpxFWmc36IWTiWHQfs0w5JDMBS1b1ZxQteo0vVVuWJvIUKHDkkeK7vIGCg==}
|
||||
engines: {node: '>= 8.0.0'}
|
||||
|
||||
normalize-path@3.0.0:
|
||||
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@ -2354,8 +2212,8 @@ packages:
|
||||
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
youtubei.js@12.2.0:
|
||||
resolution: {integrity: sha512-G+50qrbJCToMYhu8jbaHiS3Vf+RRul+CcDbz3hEGwHkGPh+zLiWwD6SS+YhYF+2/op4ZU5zDYQJrGqJ+wKh7Gw==}
|
||||
youtubei.js@13.4.0:
|
||||
resolution: {integrity: sha512-+fmIZU/dWAjsROONrASy1REwVpy6umAPVuoNLr/4iNmZXl84LyBef0n3hrd1Vn9035EuINToGyQcBmifwUEemA==}
|
||||
|
||||
zod@3.23.8:
|
||||
resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==}
|
||||
@ -2448,9 +2306,6 @@ snapshots:
|
||||
'@esbuild/linux-ia32@0.23.0':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-loong64@0.14.54':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-loong64@0.21.5':
|
||||
optional: true
|
||||
|
||||
@ -3003,8 +2858,6 @@ snapshots:
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.3
|
||||
|
||||
clone@2.1.2: {}
|
||||
|
||||
cluster-key-slot@1.1.2:
|
||||
optional: true
|
||||
|
||||
@ -3127,90 +2980,6 @@ snapshots:
|
||||
|
||||
es6-promise@3.3.1: {}
|
||||
|
||||
esbuild-android-64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-android-arm64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-darwin-64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-darwin-arm64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-freebsd-64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-freebsd-arm64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-linux-32@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-linux-64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-linux-arm64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-linux-arm@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-linux-mips64le@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-linux-ppc64le@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-linux-riscv64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-linux-s390x@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-netbsd-64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-openbsd-64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-sunos-64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-windows-32@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-windows-64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild-windows-arm64@0.14.54:
|
||||
optional: true
|
||||
|
||||
esbuild@0.14.54:
|
||||
optionalDependencies:
|
||||
'@esbuild/linux-loong64': 0.14.54
|
||||
esbuild-android-64: 0.14.54
|
||||
esbuild-android-arm64: 0.14.54
|
||||
esbuild-darwin-64: 0.14.54
|
||||
esbuild-darwin-arm64: 0.14.54
|
||||
esbuild-freebsd-64: 0.14.54
|
||||
esbuild-freebsd-arm64: 0.14.54
|
||||
esbuild-linux-32: 0.14.54
|
||||
esbuild-linux-64: 0.14.54
|
||||
esbuild-linux-arm: 0.14.54
|
||||
esbuild-linux-arm64: 0.14.54
|
||||
esbuild-linux-mips64le: 0.14.54
|
||||
esbuild-linux-ppc64le: 0.14.54
|
||||
esbuild-linux-riscv64: 0.14.54
|
||||
esbuild-linux-s390x: 0.14.54
|
||||
esbuild-netbsd-64: 0.14.54
|
||||
esbuild-openbsd-64: 0.14.54
|
||||
esbuild-sunos-64: 0.14.54
|
||||
esbuild-windows-32: 0.14.54
|
||||
esbuild-windows-64: 0.14.54
|
||||
esbuild-windows-arm64: 0.14.54
|
||||
|
||||
esbuild@0.21.5:
|
||||
optionalDependencies:
|
||||
'@esbuild/aix-ppc64': 0.21.5
|
||||
@ -3639,7 +3408,7 @@ snapshots:
|
||||
optionalDependencies:
|
||||
'@pkgjs/parseargs': 0.11.0
|
||||
|
||||
jintr@3.2.0:
|
||||
jintr@3.3.1:
|
||||
dependencies:
|
||||
acorn: 8.12.1
|
||||
|
||||
@ -3761,16 +3530,12 @@ snapshots:
|
||||
|
||||
nanoid@3.3.7: {}
|
||||
|
||||
nanoid@4.0.2: {}
|
||||
nanoid@5.1.5: {}
|
||||
|
||||
natural-compare@1.4.0: {}
|
||||
|
||||
negotiator@0.6.3: {}
|
||||
|
||||
node-cache@5.1.2:
|
||||
dependencies:
|
||||
clone: 2.1.2
|
||||
|
||||
normalize-path@3.0.0: {}
|
||||
|
||||
npm-run-path@4.0.1:
|
||||
@ -4337,10 +4102,10 @@ snapshots:
|
||||
|
||||
yocto-queue@0.1.0: {}
|
||||
|
||||
youtubei.js@12.2.0:
|
||||
youtubei.js@13.4.0:
|
||||
dependencies:
|
||||
'@bufbuild/protobuf': 2.2.3
|
||||
jintr: 3.2.0
|
||||
jintr: 3.3.1
|
||||
tslib: 2.6.3
|
||||
undici: 5.28.4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user