我正在使用YouTube数据API(在python中)上传视频。视频上传成功,我收回了YouTubeVideoEntry对象。然后我按推荐here轮询上传视频的状态,但即使在视频完成处理后(我使用Youtube.com上的视频管理器信息中心验证),CheckUploadStatus继续返回('处理',' “)。这是我的代码:
upload_status = yt_service.CheckUploadStatus(new_entry)
state = upload_status[0]
while state == "processing":
upload_status = yt_service.CheckUploadStatus(new_entry)
state = upload_status[0]
time.sleep(5)
此循环永不退出,因为upload_status [0]始终为“正在处理”