This repository was archived by the owner on Aug 16, 2025. It is now read-only.
forked from fent/node-ytdl-core
-
-
Notifications
You must be signed in to change notification settings - Fork 99
Could not download captions as seen in captions.js example #275
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
i tried to fetch subtitles using the link provided from ytdl.getInfo(URL), which is then sent to the downloadSubtitles function as follows:
function downloadSubtitles(subtitles,title,folderLocation){
// If there is no subtitles, return
if(!subtitles)
return;
// Format to be downloaded is vtt.
const format = 'vtt';
const output = join(folderLocation,`${title}-${subtitles.languageCode}-youtube.${format}`);
let outputStream = fs.createWriteStream(output);
https.get(`${subtitles.baseUrl}&fmt=${format !== 'xml' ? format : ''}`, res => {
res.pipe(outputStream);
})
}
The https request returns an empty string. I tried to paste the baseUrl into the browser and got an empty screen as well. I am unsure what could be going wrong when fetching the subtitles. Here is an example baseUrl that i used:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working