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.54k stars 279 forks source link

Added condition to initialize empty translation language list when translationLanugage key is missing #243

Closed jdepoix closed 6 months ago

jdepoix commented 6 months ago

It looks like YouTube changed something where some caption jsons will be missing the translationLanguage key. This will initialize the translationLanguages as an empty list if that happens.