-
Notifications
You must be signed in to change notification settings - Fork 2
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
Transcript retrieval is broken #4
Comments
Thank you for bringing this up. I'm currently on vacation, but I will look into it when I'm back home. |
UltimateBoi
added a commit
to UltimateBoi/youtube2anki
that referenced
this issue
Jan 15, 2025
Fixes vacmar01#4 Fix transcript retrieval error for YouTube videos. * Add a try-except block in `get_transcript` method in `y2a/clients.py` to catch `YouTubeTranscriptApi.CouldNotRetrieveTranscript` exception and log a warning if subtitles are disabled. * Modify `create_or_get_video` method in `cards/models.py` to handle empty transcripts by setting `transcript` field to "No transcript available" if the transcript is empty. * Update error handling in `generate` view in `cards/views.py` to display a user-friendly message if transcript retrieval fails by setting `context['error']` to "Transcript not available for this video" if the transcript is "No transcript available". Possible solution that may have caused crashes due to videos having transcript / closed captions disabled. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/vacmar01/youtube2anki/issues/4?shareId=XXXX-XXXX-XXXX-XXXX).
The problem is with the https://github.com/jdepoix/youtube-transcript-api package. It stopped working some weeks ago unfortunately for every video :( I will keep on looking for an alternative. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm getting an error like
for every video I try.
The text was updated successfully, but these errors were encountered: