benwiley4000 / youtube-vtt

▶️ Extract and save WebVTT closed caption tracks from YouTube videos
MIT License
46 stars 13 forks source link

Unexpected JSON token error message #4

Closed aamassoud closed 2 years ago

aamassoud commented 3 years ago

Hello, @benwiley4000,

Following the simple usage and command line usage instructions in your README, I am still unable to successfully download a closed caption file. In both the Chrome JavaScript console and my CLI, I am receiving the same error:

Unexpected token u in JSON at position 0

As an example, this is the YouTube video I was working with, although I got the same error with other videos: A disfigured Randy Orton sends fiery message to The Fiend: Raw, Jan. 18, 2021

I am using Windows Terminal and have installed Node.js v14.15.4. Could I be missing other necessary packages, or is there another issue?

Thank you

SLG commented 3 years ago

@benwiley4000 I ran into the same problem and found a fix. However, I cannot push the fix to a new branch to create a PR. Can you allow me?

benwiley4000 commented 3 years ago

Hi sorry for the delayed response. You need to fork the repository first, then create a branch on your fork, and GitHub will make it easy to open a PR from your fork branch to my repo. Let me know if you have any other questions!

SLG commented 3 years ago

Check, found it! Created a PR.

parthu34 commented 3 years ago

Hello, @benwiley4000,

Following the simple usage and command line usage instructions in your README, I am still unable to successfully download a closed caption file. In both the Chrome JavaScript console and my CLI, I am receiving the same error:

Unexpected token u in JSON at position 0

As an example, this is the YouTube video I was working with, although I got the same error with other videos: A disfigured Randy Orton sends fiery message to The Fiend: Raw, Jan. 18, 2021

I am using Windows Terminal and have installed Node.js v14.15.4. Could I be missing other necessary packages, or is there another issue?

Thank you

Same issue with me.

gquach commented 2 years ago

I can confirm that @SLG's PR works well and fixes the issue for me. https://github.com/benwiley4000/youtube-vtt/pull/5

benwiley4000 commented 2 years ago

v0.2.0 released with this fix. Very sorry about the delay.