youtube_transcript_api 1.0.0
youtube_transcript_api: ^1.0.0 copied to clipboard
Fetch YouTube transcripts/subtitles without API keys. Supports auto-generated & manual transcripts, translations, multiple formats (JSON/VTT/SRT), proxy support, and CLI.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2024-12-02 #
π Initial Release #
A complete Dart port of the Python youtube-transcript-api library with enhanced features.
Added #
Core Functionality
- π― Fetch YouTube transcripts for any video without API keys
- π Support for both manually created and auto-generated subtitles
- π Multiple language support with intelligent fallback
- π Translation support for available transcripts
- π List all available transcripts for a video
- π Filter by manually created or auto-generated transcripts
Output Formatters
- π Plain text (with and without timestamps)
- π JSON (simple and with full metadata)
- πΊ WebVTT (.vtt) - Standard web video format
- π¬ SubRip (.srt) - Universal subtitle format
- π CSV (.csv) - Spreadsheet-compatible format
- π§ Extensible formatter system for custom formats
Advanced Features
- π InnerTube API Integration - Bypasses YouTube's PoToken protection
- π€ Android client emulation for improved reliability
- π Proxy support:
- Generic HTTP/HTTPS proxy configuration
- Webshare rotating residential proxy integration
- Custom headers and timeout configuration
- π Automatic retry logic for blocked requests
- π« Comprehensive error handling with specific exceptions
Developer Experience
- π¨ Null-safe, modern Dart implementation
- π¦ Clean, type-safe API design
- β‘ Async/await throughout
- π Iterator interface for FetchedTranscript
- π οΈ Extensive documentation and examples
- β Comprehensive test suite (32 tests, 100% passing)
- π Detailed error messages with context
CLI Tool
- π» Full-featured command-line interface
- π₯ Multiple input/output formats
- π File export support
- ποΈ List available transcripts from terminal
Platform Support
- β Dart CLI applications
- β Flutter mobile apps (iOS & Android)
- β Flutter web applications
- β Flutter desktop (Windows, macOS, Linux)
Technical Highlights #
- ποΈ Architecture: Clean separation of concerns with dedicated modules for HTTP, parsing, formatting, and models
- π Security: Uses defusedxml principles for safe XML parsing
- π― Reliability: InnerTube API ensures consistent access even to protected videos
- π Performance: Efficient parsing with minimal memory footprint
- π§ͺ Quality: 100% of core functionality covered by tests
Compatibility #
- Dart SDK: >=3.0.0 <4.0.0
- Python Library Compatibility: Feature parity with youtube-transcript-api v1.2.3
- YouTube API: Uses official InnerTube API (same as YouTube mobile apps)
[Unreleased] #
Planned #
- Batch fetching for multiple videos
- Caching support to reduce API calls
- Rate limiting protection
- Cookie-based authentication for restricted videos
- Enhanced error recovery and retry logic