cobalt-7/package.json
dumbmoron a2216510b7 add cookie support
usage:
 - create cookies.json file somewhere, preferrably outside cobalt directory
 - in docker, you can bind mount it (`volumes` in composefile)
   - if you don't want cobalt to update the cookies, set it to `:ro` (cobalt will print a warning about this, ignore it)
 - set COOKIE_PATH to the absolute path of this file
 - enjoy?

usage in services: probably the simplest api ever
 - import { getCookie, updateCookie } from '../../cookie/manager.js';
 - const cookie = getCookie('<service_name>');
   - add this to headers - `headers: { cookie }`
 - after fetch is done, save potential cookie updates: updateCookie(cookie, fetch.headers)
 - see instagram.js for example usage
2023-08-16 19:59:33 +00:00

41 lines
1.1 KiB
JSON

{
"name": "cobalt",
"description": "save what you love",
"version": "7.0.1",
"author": "wukko",
"exports": "./src/cobalt.js",
"type": "module",
"engines": {
"node": ">=18"
},
"scripts": {
"start": "node src/cobalt",
"setup": "node src/modules/setup",
"test": "node src/test/test",
"build": "node src/modules/buildStatic"
},
"repository": {
"type": "git",
"url": "git+https://github.com/wukko/cobalt.git"
},
"license": "AGPL-3.0",
"bugs": {
"url": "https://github.com/wukko/cobalt/issues"
},
"homepage": "https://github.com/wukko/cobalt#readme",
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^16.0.1",
"esbuild": "^0.14.51",
"express": "^4.18.1",
"express-rate-limit": "^6.3.0",
"ffmpeg-static": "^5.1.0",
"got": "^12.1.0",
"nanoid": "^4.0.2",
"node-cache": "^5.1.2",
"set-cookie-parser": "2.6.0",
"url-pattern": "1.0.3",
"xml-js": "^1.6.11",
"youtubei.js": "^5.4.0"
}
}