Skip to content

Youtube subtitles not working #68

@Einlar

Description

@Einlar

Describe the bug
Subtitles from YouTube videos are not loaded at all.

To Reproduce
Steps to reproduce the behavior:

  1. Paste a YouTube video with JP subtitles into miteiru (e.g. I'm using this one).
  2. Wait for subtitles to (not) appear.

Expected behavior
Subtitles should appear.

Additional context
Tested on Windows 11, both for the 5.13.0 release, and by running the app in dev mode from the main branch.
I think the issue is in the getSubtitles() function, which uses axios to fetch the transcript from YouTube's API. If I add a console.log() there, like this:

const {data: transcript} = await axios.get(subtitle.baseUrl);
console.log(`Got transcript: "${transcript}"`);

Then the terminal shows:

Got transcript: ""

So I suppose YouTube changed some stuff, and now returns a blank response when trying to fetch the transcript.

Proposed solution
Using something like yt-dlp works fine, so it could be integrated there, instead of having to play catch-up with all YouTube changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions