YouTube.js
YouTube.js copied to clipboard
16.0.1 Error: Request to https://www.youtube.com/youtubei/v1/get_transcript?prettyPrint=false&alt=json failed with status 400
Steps to reproduce
- Call
info.getTranscript();in nodejs server
try {
const yt = await Innertube.create({
generate_session_locally: true,
lang: language,
cookie: COOKIE
});
const info = await yt.getInfo(video_url);
title = info.primary_info?.title ? info.primary_info?.title.toString() : '';
const defaultTranscriptInfo = await info.getTranscript();
console.log(defaultTranscriptInfo)
} catch(e) {
console.log(e)
}
Failure Logs
Error: Request to https://www.youtube.com/youtubei/v1/get_transcript?prettyPrint=false&alt=json failed with status 400
Expected behavior
it supposed to return the transcript
Current behavior
It returns that error since last week , sometimes it works after a couple of tries like 10+ tries
Version
Default
Anything else?
No response
Checklist
- [x] I am running the latest version.
- [x] I checked the documentation and found no answer.
- [x] I have searched the existing issues and made sure this is not a duplicate.
- [x] I have provided sufficient information.