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 'Subtitles are disabled for this video' as it is disabled in public YouTube but generates in a logged in account #306

Closed
daffinia1234 opened this issue Jul 22, 2024 · 8 comments

Comments

@daffinia1234
Copy link

Hi,

I'm trying to get the transcript for this video - https://www.youtube.com/watch?v=GMDTx5nTUQs where I do not see the subtitle/caption button enabled if I open it from youtube without logging in but If I login from my account I'm seeing the subtitle getting auto generated (attached the image) but if I login from another account I'm not seeing it enabled.

is it possible to get the transcript by using any method available in the library?

thanks

temp

@jdepoix
Copy link
Owner

jdepoix commented Jul 22, 2024

Hi @daffinia1234,
have a look at the Cookies section in the README!

@jdepoix jdepoix closed this as completed Jul 22, 2024
@daffinia1234
Copy link
Author

just an update, tried with cookies got from this extension - https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc/reviews?hl=en but it did not work! Meanwhile - from my local I can view the page source & get the baseUrl from '"captions":', that url gives the generated transcript. Not sure if any other site information is needed to get video with caption.

@jdepoix
Copy link
Owner

jdepoix commented Jul 24, 2024

If you can retrieve the transcript locally, but not on a cloud machine, your machine's IP might be blocked by YouTube. You can have a look at #303 to find more information on that.

@daffinia1234
Copy link
Author

sorry when I said locally, I meant in my local browser. The problem what I'm highlighting is, even after passing the cookies via cookies file like transcript_list = YouTubeTranscriptApi.list_transcripts(video, cookies='new_cookies.txt'), I'm not getting logged in via library.

I was checking the content of html after self._fetch_video_html(video_id) where it says logged_in false.
userAgent":"python-requests/2.32.3,gzip(gfe)","clientName":"WEB", "LOGGED_IN":false

So I'm not sure 1) if my cookies are correct or 2) if youtube is identifying that I'm impersonating as someone and not letting me login or 3) may be, how library http_client uses the cookies is not recognized by youtube.

Need some lead on this- thanks!

@jdepoix
Copy link
Owner

jdepoix commented Aug 1, 2024

Did you just change the path to the cookies to anonymize it or are you actually using a relative path? If that is the case, maybe try with an absolute path instead, to make sure that this is not the problem.

@KLM-Nandhu
Copy link

just an update, tried with cookies got from this extension - https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc/reviews?hl=en but it did not work! Meanwhile - from my local I can view the page source & get the baseUrl from '"captions":', that url gives the generated transcript. Not sure if any other site information is needed to get video with caption.

Hii akka, i have a issues in youtube transcript extraction. but in local youtube_transcript_api is working well. but not in cloud, ena ka pandrathu. neriya try panita roxy u try panita but inu work agala ena pandrathu

@jdepoix
Copy link
Owner

jdepoix commented Sep 25, 2024

@KLM-Nandhu It sounds like you're referring to issue #303

@KLM-Nandhu
Copy link

@KLM-Nandhu It sounds like you're referring to issue #303

how to solve this ?

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