我之前問過幾乎相同的問題,但由于在嘗試解決該問題時出現了一個新錯誤而未能得到解決方案,該錯誤掩蓋了最初的錯誤。問題是,當我嘗試使用下面的代碼上傳 YouTube 視頻時,我在標題中收到錯誤(完整跟蹤如下),但無法執(zhí)行此操作。我對導致錯誤的原因一無所知,并希望得到任何幫助。def upload(beatName, mainArtist, keywords, oneLiner): CLIENT_SECRET_FILE = 'client_secret.json' API_NAME = 'youtube' API_VERSION = 'v3' SCOPES = ['https://www.googleapis.com/auth/youtube'] service = Create_Service(CLIENT_SECRET_FILE, API_NAME, API_VERSION, SCOPES) upload_date_time = DT.datetime(2020, 9, 3, 12, 30, 0).isoformat() + '.000Z' title = "OTOROSHI - "test" description = 'Test' request_body = { 'snippet': { 'categoryI': 10, 'title': title, 'description': description, 'tags': keywords }, 'status': { 'privacyStatus': 'private', 'publishAt': upload_date_time, 'selfDeclaredMadeForKids': False, }, 'notifySubscribers': True } mediaFile = MediaFileUpload('E:\Everything.mp4') response_upload = service.videos().insert( part = 'snippet,status', body = request_body, media_body = mediaFile ).execute()
添加回答
舉報
0/150
提交
取消