Releases: rajat-mehra05/youtube-transcript-api-js
Releases · rajat-mehra05/youtube-transcript-api-js
v3.0.0
Breaking Changes
TranscriptParser.parse()now throwsTranscriptParseErrorfor non-transcript input instead of silently returning[]CouldNotRetrieveTranscript.messagenow returns the full error message (previously empty; onlytoString()worked)- Replaced
xml2jswithfast-xml-parser— removesxml2jsand@types/xml2jsdependencies - Retry logic uses exponential backoff with jitter instead of immediate recursive retry. Set
baseDelayMs: 0to restore previous behavior EnhancedYouTubeTranscriptApi.fetch()return type narrowed fromPromise<any>toPromise<FetchedTranscript | string>
Added
- Cookie authentication: Load cookies from Netscape
.txtor JSON files for age-restricted videos viacookiePathoption or--cookiesCLI flag - Retry with exponential backoff: Configurable
RetryConfigwithmaxRetries,baseDelayMs,maxDelayMs,jitterFactor YouTubeTranscriptApiOptions: Options object as 3rd constructor parameter (retryConfig,cookiePath)- CLI flags:
--cookies,--verbose,--save,--batch-file,--fail-fast - Exported missing types:
InvalidProxyUrl,TranscriptParseError,RateLimitExceeded,NetworkError,TimeoutError,ConnectionError,RetryConfig,DEFAULT_RETRY_CONFIG,loadCookiesFromFile,ParsedCookie,FormatterOptions,CliOptions
Fixed
- Removed stray
console.logdebug output from CLI - CLI
process.argvfallback no longer captures option values as video IDs - Consent cookie handling now appends to existing cookies instead of overwriting
AgeRestrictederror message now includes cookie auth instructions
v2.2.0
New Features
- VideoMetadata threading: Video metadata (
videoDetails) from the Innertube API response is now threaded throughTranscriptList,Transcript, andFetchedTranscriptvia an optionalmetadatafield. getVideoMetadata()returns real data:EnhancedYouTubeTranscriptApi.getVideoMetadata()returns actual video metadata from the Innertube API instead of hardcoded stub values.TimestampedTextFormatter: New LLM-friendly formatter producing[M:SS] textoutput with optionalgroupBySecondsbucketing. Use viaFormatterLoader.load('timestamped').VideoMetadataResultexport: Explicit interface for the return type ofgetVideoMetadata().
Bug Fixes
- Proxy config wired to base API:
EnhancedYouTubeTranscriptApiproxy options are now correctly passed to the underlyingYouTubeTranscriptApiviaEnhancedProxyConfig. Previously silently ignored. - ESM-compatible imports: Replaced
require('http')/require('https')with ESM imports to prevent bundler breakage. getVideoMetadata()throwsYouTubeTranscriptApiExceptioninstead of bareErrorfor correctinstanceofhandling.
v2.1.0
v2.0.2
v1.2.0
What's Changed
- chore: update pkg version to 1.0.3 and add changesets config by @rajat-mehra05 in #5
- Version Packages by @github-actions[bot] in #6
- Version Packages by @github-actions[bot] in #7
New Contributors
- @github-actions[bot] made their first contribution in #6
Full Changelog: v1.0.2...v1.2.0