---
title: "Comment by Jim Bowen on \"Extracting YouTube Transcripts with JavaScript\" | Hashnode"
description: "Just what I was looking for! But I am getting a CORS error because I am running the code from localhost. Apparently, you embedded your code in the youtube video"
url: "https://hashnode.com/posts/extracting-youtube-transcripts-with-javascript/65ad38d9d89b4deae7c332c0/comment/66e378a138aa6c861fc0b709"
---

[Discussion](https://hashnode.com/posts/extracting-youtube-transcripts-with-javascript/65ad38d9d89b4deae7c332c0)

Comment [Extracting YouTube Transcripts with JavaScript](https://hashnode.com/posts/extracting-youtube-transcripts-with-javascript/65ad38d9d89b4deae7c332c0)

[Jim Bowen](https://hashnode.com/@jbowen28)

[Sep 12, 2024](https://hashnode.com/posts/extracting-youtube-transcripts-with-javascript/65ad38d9d89b4deae7c332c0/comment/66e378a138aa6c861fc0b709)

Just what I was looking for! But I am getting a CORS error because I am running the code from localhost. Apparently, you embedded your code in the youtube video page from which you are getting the transcript, somehow. Do you have some code to get around the CORS error to make your code more generally applicable?

[Jim Bowen](https://hashnode.com/@jbowen28)

[Sep 12, 2024](https://hashnode.com/posts/extracting-youtube-transcripts-with-javascript/65ad38d9d89b4deae7c332c0/comment/66e378a138aa6c861fc0b709#reply-66e3796d23599d2d9a7b6e1f)

To get around the CORS error, I executed your code in my web server via an API call and returned the transcript in the API.
