youtube-transcript-node
Version:
This is a Node.js API which allows you to get the transcripts/subtitles for a given YouTube video. It also works for automatically generated subtitles and supports translating subtitles.
61 lines • 2.3 kB
TypeScript
export declare class YouTubeTranscriptApiException extends Error {
constructor(message: string);
}
export declare class CouldNotRetrieveTranscript extends YouTubeTranscriptApiException {
videoId: string;
protected ERROR_MESSAGE: string;
protected CAUSE_MESSAGE_INTRO: string;
protected CAUSE_MESSAGE: string;
protected GITHUB_REFERRAL: string;
constructor(videoId: string);
get cause(): string;
toString(): string;
}
export declare class YouTubeDataUnparsable extends CouldNotRetrieveTranscript {
constructor(videoId: string);
}
export declare class YouTubeRequestFailed extends CouldNotRetrieveTranscript {
reason: string;
constructor(videoId: string, error: Error);
}
export declare class VideoUnavailable extends CouldNotRetrieveTranscript {
constructor(videoId: string);
}
export declare class VideoUnplayable extends CouldNotRetrieveTranscript {
reason: string;
subReasons: string[];
constructor(videoId: string, reason: string, subReasons?: string[]);
}
export declare class TranscriptsDisabled extends CouldNotRetrieveTranscript {
constructor(videoId: string);
}
export declare class NoTranscriptFound extends CouldNotRetrieveTranscript {
requestedLanguageCodes: string[];
transcriptData: any;
constructor(videoId: string, requestedLanguageCodes: string[], transcriptData: any);
}
export declare class TranslationLanguageNotAvailable extends CouldNotRetrieveTranscript {
constructor(videoId: string);
}
export declare class NotTranslatable extends CouldNotRetrieveTranscript {
constructor(videoId: string);
}
export declare class FailedToCreateConsentCookie extends CouldNotRetrieveTranscript {
constructor(videoId: string);
}
export declare class InvalidVideoId extends CouldNotRetrieveTranscript {
constructor(videoId: string);
}
export declare class IpBlocked extends CouldNotRetrieveTranscript {
constructor(videoId: string);
}
export declare class RequestBlocked extends CouldNotRetrieveTranscript {
constructor(videoId: string);
}
export declare class AgeRestricted extends CouldNotRetrieveTranscript {
constructor(videoId: string);
}
export declare class PoTokenRequired extends CouldNotRetrieveTranscript {
constructor(videoId: string);
}
//# sourceMappingURL=index.d.ts.map