It's possible to use the Twitter API to upload SRT subtitles and attach them to an already-uploaded video.
The guide to upload and attach subtitles is part of the API documentation for media/subtitles/create. The guide suggests uploading an SRT file through the chunked media upload endpoint. After a quick look it looks like twitter_utils.parse_media_file returns None for the media_type if you try a file that has an .srt extension.
I'm happy to implement this myself. I have a working proof of concept for /create and I've made some changes to the parse_media_file function that will make UploadMediaChunked happy with uploading SRT files.
It's possible to use the Twitter API to upload SRT subtitles and attach them to an already-uploaded video.
The guide to upload and attach subtitles is part of the API documentation for media/subtitles/create. The guide suggests uploading an SRT file through the chunked media upload endpoint. After a quick look it looks like
twitter_utils.parse_media_file
returnsNone
for themedia_type
if you try a file that has an.srt
extension.There also needs to be helper functions implemented for media/subtitles/create and media/subtitles/delete
I'm happy to implement this myself. I have a working proof of concept for /create and I've made some changes to the
parse_media_file
function that will makeUploadMediaChunked
happy with uploading SRT files.