api/youtube: use both ios & web_embedded client depending on request

this ensures better reliability & reduces rate limiting of either clients
This commit is contained in:
wukko
2025-03-20 10:58:15 +06:00
parent e779506d9e
commit 24ce19d09f
2 changed files with 39 additions and 21 deletions

View File

@@ -57,6 +57,7 @@ const env = {
customInnertubeClient: process.env.CUSTOM_INNERTUBE_CLIENT,
ytSessionServer: process.env.YOUTUBE_SESSION_SERVER,
ytSessionReloadInterval: 300,
ytSessionInnertubeClient: process.env.YOUTUBE_SESSION_INNERTUBE_CLIENT,
}
const genericUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36";