UNPKG

ai-youtube-transcript

Version:

Fetch and process transcripts from YouTube videos with support for multiple languages, translation, and formatting

30 lines (29 loc) 863 B
import { ProxyConfig } from '../proxies/proxy-config'; /** * HTTP client for making requests to YouTube */ export declare class HttpClient { private readonly cookiePath?; private readonly proxyConfig?; private cookieHeader; /** * Creates a new HttpClient instance * * @param cookiePath - Path to a cookies.txt file * @param proxyConfig - Proxy configuration */ constructor(cookiePath?: string, proxyConfig?: ProxyConfig); /** * Load cookies from a file * * @param cookiePath - Path to the cookies file */ private loadCookies; /** * Make a fetch request with the configured options * * @param url - The URL to fetch * @param options - Additional fetch options */ fetch(url: string, options?: RequestInit): Promise<Response>; }