jdepoix / youtube-transcript-api

This is a python API which allows you to get the transcript/subtitles for a given YouTube video. It also works for automatically generated subtitles and it does not require an API key nor a headless browser, like other selenium based solutions do!
MIT License
2.87k stars 326 forks source link

close caption vs transcript? #155

Closed BillionShields closed 1 year ago

BillionShields commented 2 years ago

Interesting case. Video is fresh so transcript is not yet available but closed captions CC are. Is there a way to get those?

jdepoix commented 2 years ago

Hi @BillionShields, just to clarify: you mean that you can already enable subtitles on the YouTube's web player but when querying the transcript with this module you get an error? It seems rather unlikely, as this module uses the same API endpoints the web player does, but maybe the request done by your youtube-transcript-api code was answered by a different node than the request done by your browser and that node wasn't up to date yet (the nature of eventually consistent systems). I haven't encountered that myself and its a bit tricky to test out. Do you have a usecase were this is a problem, or just something your were curious about?

jdepoix commented 1 year ago

closed due to inactivity