Following How to grant scope to also upload captions on YouTube , I programmed the upload of subtitle or caption files to videos on my channel:
try:
# If the subtitles do not exist, add them
youtube.captions().insert(
part="snippet",
body=snippet,
media_body=fp
).execute()
print(f'{new_lg} inserted successfully!')
except Exception as e:
print(f'An error occurred:', str(e))
The code executes without error and the subtitles show on YouTube, for example this video:
but YouTube Studio does not show a subtitle file for the same video, even after 24 hours:
If I upload the same subtitle file manually on YouTube Studio, then it does show on both.
How can I ensure that the subtitle files I upload programmatically also appear on YouTube Studio?