No longer getting transcripts
Hello,
I was able to get transcripts for videos about a month ago, but it seems that all attempts now return an error that the transcripts aren't available. I have tried multiple videos. Thanks
Have you tried upgrading your youtube-transcript-api package? There were quite a few issues opened about 20 days ago when youtube changed their formatting for the captions, so if you haven't updated in the last month you could be experiencing that bug.
If you are on the latest version of the package, could you please provide which video IDs are not working for you now, because I tested a few random vids and the package was working for me.
Thanks
Thank you! I thought I had updated, but I'm a novice in python, so it was a simple mistake. Sorry!
Its no problem. Glad you got it working!
I'm sorry for disturbing you, I am using the latest version 0.1.9, however, I get an error. The error message is as follows.
Traceback (most recent call last): File "E: \ 06_python_venvs \ youtube_data_lesson4 \ lib \ site-packages \ youtube_transcript_api \ _api.py", line 95, in get_transcript return _TranscriptParser (_TranscriptFetcher (video_id, languages, proxies) .fetch ()). parse () File "E: \ 06_python_venvs \ youtube_data_lesson4 \ lib \ site-packages \ youtube_transcript_api \ _api.py", line 121, in fetch + len (self.TIMEDTEXT_STRING) + 1 IndexError: list index out of range
I am trying to take the caption of the video here.
https://www.youtube.com/watch?v=wIjK-6Do6lg
Anything is fine so please help me!
I'm sorry. I just made a mistake here.
Wrong)
YouTubeTranscriptApi.get_transcripts(video_id)
Correct)
YouTubeTranscriptApi.get_transcript(video_id)
I am new here. I am using youtube transcript api to get the subtitles; but the times of "duration" keys do not seem correct to me. Because they overlap. Is there a way to find out the start and end date of each word spoken in the video? Help me please. Its important to me.
@sekpona1-crypto The duration is the on-screen time of the subtitle box on YouTube. Since there usually are at least two subtitle boxes overlapping, durations will also overlap. There's no way to work around this as the information when a sentence ends is not available.