read-browser-cookies
Version:
Node.js version of `--cookies-from-browser` from yt-dlp
19 lines (18 loc) • 788 B
TypeScript
/**
* https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/cookies.py
*/
import { ICookie } from '../db';
import { ArrayItems } from '../helper';
export declare const chromiumBasedBrowsers: ("brave" | "chrome" | "chromium" | "edge" | "opera" | "vivaldi")[];
export type IChromiumBasedBrowser = ArrayItems<typeof chromiumBasedBrowsers>;
export declare function readChromium(browserName: IChromiumBasedBrowser, { profile, keyring, site }?: {
profile?: string;
keyring?: string;
site?: string;
}): Promise<ICookie[] | undefined>;
/**
* 17 位时间戳的处理
* https://stackoverflow.com/questions/20458406/what-is-the-format-of-chromes-timestamps
* 11644473600 = 1970-1-1 - 1601-1-1, 单位 (s)
*/
export declare function processChromeTimestamp(chromeTs: number): number;