Repository navigation
v1.3.0
YouTube Transcript API v1.3.0
New Features
HTTP/HTTPS Proxy Support 🌐
You can now configure HTTP and HTTPS proxies for all API requests:
// Configure separate proxies for HTTP and HTTPS
const api = new YouTubeTranscriptApi({
proxy: {
enabled: true,
http: 'http://http-proxy-server.com:8080',
https: 'http://https-proxy-server.com:8443',
},
});
// Or set the same proxy for both
api.setProxyOptions({
enabled: true,
http: 'http://username:password@proxy.com:8080',
https: 'http://username:password@proxy.com:8080',
});This feature is particularly useful for:
- Bypassing network restrictions
- Routing requests through specific servers
- Adding an extra layer of privacy
Breaking Changes
Batch Transcript Fetching Removed ⚠️
The fetchTranscripts method has been removed as it was not properly implemented. If you were using this functionality, you'll need to implement your own solution using the single fetchTranscript method:
// Before (no longer works)
const { results, errors } = await api.fetchTranscripts(['VIDEO_ID_1', 'VIDEO_ID_2']);
// After (implement your own batch processing)
const results = {};
const errors = {};
for (const videoId of ['VIDEO_ID_1', 'VIDEO_ID_2']) {
try {
results[videoId] = await api.fetchTranscript(videoId);
} catch (error) {
errors[videoId] = error;
}
}Dependencies
- Added
http-proxy-agentandhttps-proxy-agentpackages for proxy support
Full Changelog: v1.2.0...v1.3.0