Closed achikapa closed 6 months ago
i getting same result too. :(
Hi, thanks for reporting!
It seems that YouTube has made some changes which caused the translationLanguages
key to sometimes be missing from the captions json. I just published v0.6.2, which initializes translation_languages
with an empty list in case that happens. So upgrading to v0.6.2 should fix this error!
awesome, thanks! 🚀
First of all thanks for this awesome library! I came across this unexpected error:
To Reproduce
Call YouTubeTranscriptApi.list_transcripts or YouTubeTranscriptApi.get_transcript with
video_id = "KSgWiokWS6g"
.What code / cli command are you executing?
or
Which Python version are you using?
Python 3.11.6
Which version of youtube-transcript-api are you using?
youtube-transcript-api 0.6.1
Expected behavior
I expected a transcript to be returned or raise on of the following exceptions:
TranscriptsDisabled
,NoTranscriptFound
,NoTranscriptAvailable
if no transcript can be retreived.Actual behaviour
A
KeyError: 'translationLanguages'
is raised: