const { YoutubeTranscript } = require('youtube-transcript'); YoutubeTranscript.fetchTranscript('dQw4w9WgXcQ').then(console.log).catch(console.error);