Skip to content

Conversation

@mateusbadalotti
Copy link
Contributor

@mateusbadalotti mateusbadalotti commented Jan 29, 2026

Description

Fixes #23718

  • Fix YouTube transcript parsing for srv3 format by extracting text from <s> segments instead of <p> tags
  • Remove deprecated Summarize YouTube Video command

YouTube’s timedtext API returns captions in srv3 XML format, where text is nested inside <s> (segment) tags within <p> (paragraph) tags:

<p t="280" d="3840" w="1">
  <s ac="0">Hello</s>
  <s t="280" ac="0"> world</s>
</p>

The previous regex only matched direct content in

tags, resulting in empty transcripts. This fix:

  • Extracts text from <s> tags (primary)
  • Falls back to <text> tags for older formats
  • Joins segments without extra spaces (segments already include spacing)

Also removed the deprecated unified command since provider-specific commands are now the recommended approach.

Screencast

Extensions works properly again:

image.mp4

Checklist

- fix transcription, remove deprecated command
- fixes
- Pull contributions
- fix youtube transcripts
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: summarize-youtube-video-with-ai Issues related to the summarize-youtube-video-with-ai extension platform: macOS platform: Windows labels Jan 29, 2026
@raycastbot
Copy link
Collaborator

raycastbot commented Jan 29, 2026

Thank you for your contribution! 🎉

🔔 @iKasch @bl1nk you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

📋 Quick checkout commands
BRANCH="ext/summarize-youtube-video-with-ai"
FORK_URL="https://github.com/mateusbadalotti/raycast-extensions.git"
EXTENSION_NAME="summarize-youtube-video-with-ai"
REPO_NAME="raycast-extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days.

@mateusbadalotti mateusbadalotti marked this pull request as ready for review January 29, 2026 02:04
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 29, 2026

Greptile Overview

Greptile Summary

This PR fixes a critical bug where YouTube transcripts were returning empty due to incorrect XML parsing for YouTube's srv3 format. The previous regex only matched direct content in <p> tags, but YouTube's API returns text nested inside <s> (segment) tags. The fix extracts text from <s> tags with a fallback to <text> tags for older formats, and joins segments without extra spaces since segments already include proper spacing.

The PR also removes the deprecated unified "Summarize YouTube Video" command and its associated view component, completing the migration to provider-specific commands that was introduced earlier.

  • Fixed transcript parsing to handle YouTube's srv3 XML format by extracting from <s> segments
  • Changed segment joining from join(" ") to join("") to avoid duplicate spacing
  • Removed 114 lines of deprecated command configuration from package.json
  • Deleted deprecated summarizeVideo.tsx component
  • Updated CHANGELOG with proper {PR_MERGE_DATE} placeholder format

Confidence Score: 5/5

  • This PR is safe to merge with no concerns
  • The changes are well-tested (confirmed working in screencast), address a critical bug with a proper fix, and cleanly remove deprecated code without affecting active functionality
  • No files require special attention

Important Files Changed

Filename Overview
extensions/summarize-youtube-video-with-ai/src/utils/getVideoTranscript.ts Fixed XML parsing to extract text from <s> segments instead of <p> tags for YouTube srv3 format, with fallback to <text> tags
extensions/summarize-youtube-video-with-ai/package.json Removed deprecated unified command and added contributor, cleaning up 114 lines of obsolete configuration
extensions/summarize-youtube-video-with-ai/CHANGELOG.md Added new changelog entry with {PR_MERGE_DATE} placeholder documenting transcript parsing fix and command removal

@mateusbadalotti
Copy link
Contributor Author

@iKasch @bl1nk can you take a look on this? :)

@iKasch
Copy link
Contributor

iKasch commented Jan 29, 2026

@mateusbadalotti looks good to me, thank you!
Can you quickly remove the entry in the README about the deprecated command as well? Glas that one is out now, @pernielsentikaer 😄

@mateusbadalotti
Copy link
Contributor Author

Sure! done @iKasch

@raycast-extensions-bot raycast-extensions-bot bot added the Approved Approved by a user label Jan 29, 2026
@mateusbadalotti
Copy link
Contributor Author

@pernielsentikaer @0xdhrv

@pernielsentikaer pernielsentikaer self-assigned this Jan 29, 2026
Copy link
Collaborator

@pernielsentikaer pernielsentikaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, approved 🔥

@raycastbot raycastbot merged commit 2863ff3 into raycast:main Jan 29, 2026
2 checks passed
@github-actions
Copy link
Contributor

Published to the Raycast Store:
https://raycast.com/kom/summarize-youtube-video-with-ai

@raycastbot
Copy link
Collaborator

🎉 🎉 🎉

Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@mateusbadalotti).

Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Approved by a user extension fix / improvement Label for PRs with extension's fix improvements extension: summarize-youtube-video-with-ai Issues related to the summarize-youtube-video-with-ai extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Summarize YouTube Videos with AI] Cannot summarize yt videos

4 participants