Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting 401 errors on all videos Nov 25,2024 #356

Closed
hjeffreywang opened this issue Nov 25, 2024 · 5 comments
Closed

Getting 401 errors on all videos Nov 25,2024 #356

hjeffreywang opened this issue Nov 25, 2024 · 5 comments

Comments

@hjeffreywang
Copy link

hjeffreywang commented Nov 25, 2024

Could be a ongoing update from youtube, but today all my caption calls have been giving me errors

tested video IDs: ['e9Ne4oU7fLQ', 'ZlPdPbbwqd8', 'rR71vbzutNE', '9OH9U03U180', '4rnn52ySx18', 'D5MjRZvT8aM', 'azQ4cvTHYyQ', 'wDDSiSjxQcE']

To Reproduce

Steps to reproduce the behavior: just call the usual script
YouTubeTranscriptApi.get_transcript(video_id)

What code / cli command are you executing?

For example: I am running

 YouTubeTranscriptApi.get_transcript(video_id)

Which Python version are you using?

Python 3.10

Which version of youtube-transcript-api are you using?

youtube-transcript-api 0.6.3

Actual behaviour

Could not retrieve a transcript for the video https://www.youtube.com/watch?v=e9Ne4oU7fLQ! This is most likely caused by:

Subtitles are disabled for this video

Subtitles are not disabled on this video, I've tried other videos and gotten the same error

@jdepoix
Copy link
Owner

jdepoix commented Nov 25, 2024

Hi @hjeffreywang, are you running this code locally or in a cloud environment? If it is run in the cloud, it is very likely to be related to #303.

@hjeffreywang
Copy link
Author

I'll try using a different wifi. Was using hotel wifi, VPN, and local docker container. Usual stack works with VPN and docker container which leaves that wifi as the culprit. Will update once I get home from my flight

@starlacortes
Copy link

Can confirm. Transcripts are returning:

"{"error":"\nCould not retrieve a transcript for the video https://www.youtube.com/watch?v=dQw4w9WgXcQ! This is most likely caused by:\n\nSubtitles are disabled for this video\n\nIf you are sure that the described cause is not responsible for this error and that a transcript should be retrievable, please create an issue at https://github.com/jdepoix/youtube-transcript-api/issues. Please add which version of youtube_transcript_api you are using and provide the information needed to replicate the error. Also make sure that there are no open issues which already describe your problem!"}"

I am running on a cloud AWS server, Debian, with a flask container.

@hjeffreywang
Copy link
Author

I fixed the error. The issue seems to stem from a update on a from a different youtube based library. Could also be a weird container interaction, but after pruning some code, it seems to have worked.

@jdepoix
Copy link
Owner

jdepoix commented Nov 26, 2024

@starlacortes to find more on the issue you are describing head over to #303.

@hjeffreywang thanks for the update! I will close this now!

@jdepoix jdepoix closed this as completed Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants