-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NOT WORKİNG AT ALL #15
Comments
Same. Just tried now |
Does not work for me either. |
@Medullitus thanks for opening this issue -- I was also experiencing it, but haven't had time to dig in or debug @ozdemir08 I started looking into this today. I updated my local Created a new import { YoutubeTranscript } from "youtube-transcript";
YoutubeTranscript.fetchTranscript("https://www.youtube.com/watch?v=nJ660t5ku9A").then(console.log); And ran it with While running it in the plugin loaded in Obsidian though, I'm seeing a CORS error: This 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 @hardchor @ozdemir08 & others -- do you have any suggestions? |
FYI: Just created this issue in the YoutubeTranscript repo I think we can resolve the new CORS error by making the fetch using Will create a PR there and see how it goes. |
YoutubeTranscript Pull Request created here: Kakulukian/youtube-transcript#35 Once these changes are in, then import { request } from "obsidian";
...
export class TranscriptSummarizer {
...
async getSummaryFromUrl(url: string): Promise<string> {
...
const ytt = new ObsidianYoutubeTranscript(url);
const transcriptList = await ytt.fetchTranscript();
...
}
...
}
class ObsidianYoutubeTranscript extends YoutubeTranscript {
videoId: string;
videoPageBody: string;
transcriptBody: string;
constructor(videoId: string) {
super();
this.videoId = YoutubeTranscript.retrieveVideoId(videoId);
}
public async getPageBody(): Promise<string> {
const videoPageResponse = await request(
`https://www.youtube.com/watch?v=${this.videoId}`
);
this.videoPageBody = videoPageResponse;
return this.videoPageBody;
}
public async getTranscriptResponse(transcriptURL: string): Promise<string> {
const transcriptResponse = await request(transcriptURL);
this.transcriptBody = transcriptResponse;
return this.transcriptBody;
}
} |
Hey ! has this been fixed / added yet ? |
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...
The text was updated successfully, but these errors were encountered: