Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3641

How can I insert multiple language caption files into YouTube videos using batch processing mode

$
0
0
batch = BatchHttpRequest()    requests = []    for language, caption in caption_files.items():        request = youtube.captions().insert(            part='snippet',            body={'snippet': {'videoId': video_id,'language': caption.get("code"),'name': language,'isDraft': False                }            },            media_body=caption.get("path")        )        batch.add(request, callback=insert_caption, request_id=video_id)    batch.execute()

I tried with batch = youtube.new_batch_http_request() also. Both are not working. I am getting errors.

Can anyone help me resolve these issues? Are there classes and functions available in Google's Python modules related to batch processing that support inserting/updating captions for YouTube videos?


Viewing all articles
Browse latest Browse all 3641

Trending Articles