Cookies update

This commit is contained in:
killer069
2021-10-08 14:58:06 +05:30
parent 0058e71efd
commit 4608f3d59b
8 changed files with 257 additions and 23 deletions

View File

@@ -12,7 +12,6 @@ export enum StreamType {
export interface StreamOptions {
quality?: number;
cookie?: string;
proxy?: Proxy[];
}
@@ -54,7 +53,7 @@ export type YouTubeStream = Stream | LiveStreaming;
* @returns Stream class with type and stream for playing.
*/
export async function stream(url: string, options: StreamOptions = {}): Promise<YouTubeStream> {
const info = await video_info(url, { cookie: options.cookie, proxy: options.proxy });
const info = await video_info(url, { proxy: options.proxy });
const final: any[] = [];
if (
info.LiveStreamData.isLive === true &&
@@ -83,7 +82,6 @@ export async function stream(url: string, options: StreamOptions = {}): Promise<
info.video_details.durationInSec,
Number(final[0].contentLength),
info.video_details.url,
options.cookie as string,
options
);
}
@@ -122,7 +120,6 @@ export async function stream_from_info(info: InfoData, options: StreamOptions =
info.video_details.durationInSec,
Number(final[0].contentLength),
info.video_details.url,
options.cookie as string,
options
);
}