Kakulukian / youtube-transcript

Fetch transcript from a youtube video
307 stars 61 forks source link

[YoutubeTranscript] 🚨 TypeError: Failed to fetch #17

Closed Sawan1994 closed 7 months ago

Sawan1994 commented 8 months ago

I am creating an extension using react where I am calling below code for generating transcript from youtube video:

export const generateTranscriptFromURL = async (videoURL) => {
  const transcript = await YoutubeTranscript.fetchTranscript(videoURL);

  return transcript;
};

When I enter a youtube URL and hit enter, I get below error:

youtube-transcript.esm.js:73 Uncaught (in promise) Error: [YoutubeTranscript] 🚨 TypeError: Failed to fetch
    at new YoutubeTranscriptError (youtube-transcript.esm.js:73:1)
    at Function.<anonymous> (youtube-transcript.esm.js:144:1)
    at step (youtube-transcript.esm.js:62:1)
    at Object.throw (youtube-transcript.esm.js:43:1)
    at rejected (youtube-transcript.esm.js:34:1)
manghat commented 4 months ago

Was this resolved?