merge: changes from main

This commit is contained in:
wukko
2025-03-27 20:01:46 +06:00
18 changed files with 186 additions and 181 deletions

View File

@@ -1,33 +0,0 @@
# how to configure a cobalt instance for youtube
if you get various errors when attempting to download videos that are:
publicly available, not region locked, and not age-restricted;
then your instance's ip address may have bad reputation.
in this case you have to use disposable google accounts.
there's no other known workaround as of time of writing this document.
> [!CAUTION]
> **NEVER** use your personal google account for downloading videos via any means.
> you can use any google accounts that you're willing to sacrifice,
> but be prepared to have them **permanently suspended**.
>
> we recommend that you use accounts that don't link back to your personal google account or identity, just in case.
>
> use incognito mode when signing in.
> we also recommend using vpn/proxy services (such as [mullvad](https://mullvad.net/)).
1. if you haven't done it already, clone the cobalt repo, go to the cloned directory, and run `pnpm install`
2. run `pnpm -C api token:youtube`
3. follow instructions, use incognito mode in your browser when signing in.
i cannot stress this enough, but again, **DO NOT USE YOUR PERSONAL GOOGLE ACCOUNT**.
4. once you have the oauth token, add it to `youtube_oauth` in your cookies file.
you can see an [example here](/docs/examples/cookies.example.json).
you can have several account tokens in this file, if you like.
5. all done! enjoy freedom.
### liability
you're responsible for any damage done to any of your google accounts or any other damages. you do this by yourself and at your own risk.

View File

@@ -11,7 +11,7 @@
"twitter": [
"auth_token=<replace_this>; ct0=<replace_this>"
],
"youtube_oauth": [
"<output from running `pnpm run token:youtube` in `api` folder goes here>"
"youtube": [
"cookie=<replace_this>; b=<replace_this>"
]
}

View File

@@ -41,3 +41,14 @@ services:
command: --cleanup --scope cobalt --interval 900 --include-restarting
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# if needed, use this image for automatically generating poToken & visitor_data
# yt-session-generator:
# image: ghcr.io/imputnet/yt-session-generator:webserver
# init: true
# restart: unless-stopped
# container_name: yt-session-generator
# ports:
# - 127.0.0.1:1280:8080

View File

@@ -81,6 +81,7 @@ sudo service nscd start
| `API_INSTANCE_COUNT` | | `2` | supported only on Linux and node.js `>=23.1.0`. when configured, cobalt will spawn multiple sub-instances amongst which requests will be balanced. |
| `DISABLED_SERVICES` | | `bilibili,youtube` | comma-separated list which disables certain services from being used. |
| `CUSTOM_INNERTUBE_CLIENT` | | `IOS` | innertube client that will be used instead of the default one. |
| `YOUTUBE_SESSION_SERVER` | | `http://localhost:8080/` | url to an instance of [invidious' youtube-trusted-session-generator](https://github.com/iv-org/youtube-trusted-session-generator) or its fork/counterpart. used for automatically pulling poToken & visitor_data for youtube. can be local or remote. |
\* the higher the nice value, the lower the priority. [read more here](https://en.wikipedia.org/wiki/Nice_(Unix)).