youtube: add cookie support (#553)
This commit is contained in:
parent
268b6a40a3
commit
f6632e2d61
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ import { Innertube, Session } from 'youtubei.js';
|
|||
import { env } from '../../config.js';
|
||||
import { cleanString } from '../../sub/utils.js';
|
||||
import { fetch } from 'undici'
|
||||
import { getCookie } from '../cookie/manager.js'
|
||||
|
||||
const ytBase = Innertube.create().catch(e => e);
|
||||
|
||||
|
@ -35,7 +36,7 @@ const cloneInnertube = async (customFetch) => {
|
|||
innertube.session.api_version,
|
||||
innertube.session.account_index,
|
||||
innertube.session.player,
|
||||
undefined,
|
||||
getCookie('youtube'),
|
||||
customFetch ?? innertube.session.http.fetch,
|
||||
innertube.session.cache
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue