Skip to content

Conversation

@iKasch
Copy link
Contributor

@iKasch iKasch commented Jan 27, 2026

Description

fetching transcripts was broken due to changes on youtubes end. I added a test file to quickly check and work on fixes, as well as actually fixing the issue.

Screencast

Checklist

@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 OP is author The OP of the PR is the author of the extension labels Jan 27, 2026
@raycastbot
Copy link
Collaborator

Thank you for the update! 🎉

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

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 27, 2026

Greptile Overview

Greptile Summary

This PR fixes YouTube transcript fetching by replacing the brittle web scraping approach with YouTube's ANDROID client API. The previous implementation scraped the video page HTML and parsed complex JSON structures, which broke when YouTube changed their internal structure. The new approach directly calls the YouTube API endpoint with proper client identification.

Key changes:

  • Switched from HTML scraping to YouTube ANDROID client API (getVideoTranscript.ts:35-48)
  • Simplified XML parsing using <p> tag extraction instead of complex JSON traversal (getVideoTranscript.ts:104-121)
  • Added comprehensive test file for verifying transcript fetching (test/transcript.test.ts)
  • Upgraded dependencies including @raycast/api, openai, and other packages
  • Updated CHANGELOG following correct format with {PR_MERGE_DATE} placeholder

Minor issue:

  • The youtube-transcript package was added to dependencies but is not used in the codebase

Confidence Score: 4/5

  • Safe to merge with one minor optimization suggestion
  • The core fix properly addresses the transcript fetching issue by switching from web scraping to the ANDROID client API. The implementation is clean with proper error handling. One unused dependency should be removed for cleanliness.
  • No files require special attention

Important Files Changed

Filename Overview
extensions/summarize-youtube-video-with-ai/src/utils/getVideoTranscript.ts Replaced web scraping approach with YouTube ANDROID client API for reliable transcript fetching
extensions/summarize-youtube-video-with-ai/test/transcript.test.ts Added manual test file for verifying YouTube transcript fetching logic
extensions/summarize-youtube-video-with-ai/package.json Upgraded dependencies and added youtube-transcript package, included test script

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

"node-fetch": "^3.3.2",
"openai": "^5.1.0",
"openai": "^6.16.0",
"youtube-transcript": "^1.2.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

youtube-transcript package is added but not imported anywhere in the code

Suggested change
"youtube-transcript": "^1.2.1",
"ytdl-core": "^4.11.5"

@0xdhrv 0xdhrv self-assigned this Jan 27, 2026
Copy link
Contributor

@0xdhrv 0xdhrv 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 87bb077 into raycast:main Jan 27, 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

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will 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

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 OP is author The OP of the PR is the author of the extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants