Commit 0663eb1f by baiquan

优化上传视频判断成功状态码

parent 4a8a2cda
......@@ -506,7 +506,7 @@ class Upload:
play_auth_token = self.get_upload_token(video_id)['play_auth_token']
response = requests.get(f'https://vod.bytedanceapi.com/?{play_auth_token}', headers=self.headers, cookies=self.cookies, timeout=5, proxies=self.proxies)
logger.info(response.text)
if response.json()['Result']['Data']['Status'] != 10:
if response.json()['Result']['Data']['Status'] != 10 and response.json()['Result']['Data']['Status'] != 1000:
raise Exception('上传视频失败')
return response.json()['Result']['Data']['PlayInfoList'][0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment