ozdemir08 / youtube-video-summarizer

MIT License
25 stars 4 forks source link

NOT WORKİNG AT ALL #15

Open Medullitus opened 1 month ago

Medullitus commented 1 month ago

When I try to add YT video url and push the "Generate summary" button it gives me error! The error is that "Error: [YoutubeTranscript] TypeError: Cannot read properties of undefinied (reading 'transcriptBodyRenderer'). So I can't use the plugin...

jeffscottward commented 1 month ago

Same. Just tried now

mariusursache commented 1 month ago

Does not work for me either.

hardchor commented 1 month ago

See https://github.com/langchain-ai/langchainjs/issues/4994

rshmhrj commented 2 days ago

@Medullitus thanks for opening this issue -- I was also experiencing it, but haven't had time to dig in or debug @hardchor -- thanks for the reference link -- very helpful!

@ozdemir08 I started looking into this today.

I updated my local package.json with the latest version of youtube-transcript "youtube-transcript": "^1.2.1" and ran some tests:

Created a new test.mjs file:

import { YoutubeTranscript } from "youtube-transcript";
YoutubeTranscript.fetchTranscript("https://www.youtube.com/watch?v=nJ660t5ku9A").then(console.log);

And ran it with node src/test.mjs and was able to get the transcript data back -- no issues.

While running it in the plugin loaded in Obsidian though, I'm seeing a CORS error: image

This fetch from YoutubeTranscript seems to be failing: image

I found one possible solution, but haven't tried it out yet: https://github.com/wanadev/obsidian-http-request -- this runs a proxy and wraps the requests so that CORS errors are bypassed. Implementing this would probably require us to bring in the fetchTranscript functionality from YoutubeTranscript, which I don't really like.

@hardchor @ozdemir08 & others -- do you have any suggestions?