UNPKG

yaytt

Version:

Blazingly fast YouTube caption extractor with deduplication.

20 lines (19 loc) 693 B
import { Caption, CaptionOptions, ExtractorConfig } from './types.js'; export declare class YouTubeCaptionExtractor { private rateLimiter; private config; private youtubeAPI; constructor(config?: ExtractorConfig); extractCaptions(videoId: string, options?: CaptionOptions): Promise<Caption[]>; extractCaptionsFromUrl(url: string, options?: CaptionOptions): Promise<Caption[]>; getAvailableLanguages(videoId: string): Promise<Array<{ code: string; name: string; isAutomatic: boolean; }>>; private extractVideoId; private isRateLimited; private updateRateLimit; private delay; clearRateLimit(videoId?: string): void; }