Fix: Update youtubei.js Transcript Fetching Logic - #5
Conversation
…PI changes. The previous `yt.getTranscript` function call was causing an error because it is no longer available in the library. This commit replaces the old method with the correct multi-step process for fetching transcripts, which involves getting video info to find caption tracks and then executing a `get_transcript` action. This change restores the transcript fetching functionality and adds more specific error handling for private videos or videos without captions.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. |
Fix: Update youtubei.js Transcript Fetching Logic
The
yt.getTranscriptfunction call inbackground.jswas causing a runtime error because it is no longer a valid function inyoutubei.jsv8.0.0. This fix replaces the deprecated function with the correct, multi-step API process for fetching transcripts. The new implementation first retrieves video information to find available caption tracks and then executes aget_transcriptaction to download the transcript data. This change successfully restores the extension's core functionality and improves error handling.PR created automatically by Jules for task 13865063330465325120