Kakulukian / youtube-transcript

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

May no longer work #4

Closed bkamapantula closed 1 year ago

bkamapantula commented 1 year ago

Thanks for the library!

I think transcription no longer works as it throws an error. I tried it with the complete URL and with the video string alone.

TypeError: YoutubeTranscript.fetchTranscript is not a function

Kakulukian commented 1 year ago

Hi!

It was due to the default export and a normal one when using cjs. I updated the package, it should work with the following example:

import { YoutubeTranscript } from 'youtube-transcript';

YoutubeTranscript.fetchTranscript('videoId or URL').then(console.log);
bkamapantula commented 1 year ago

Thanks for the update!