Python调用共享脚本

Python调用共享脚本,返回10000,脚本没运行

import http.client

conn = http.client.HTTPSConnection("www.kdocs.cn")

payload = "{\"Context\":{\"argv\":{}}}"

headers = {

'Content-Type': "application/json",

'AirScript-Token': "https://www.kdocs.cn/api/v3/ide/file/ccOvddxLxI7l/script/V2-4LAg8cU8BVO4PU25kRFqC9/sync_task"

}

conn.request("POST", "/api/v3/ide/file/ccOvddxLxI7l/script/V2-4LAg8cU8BVO4PU25kRFqC9/sync_task", payload, headers)

res = conn.getresponse()

data = res.read()

print(data.decode("utf-8"))

返回

{"errno":10000,"msg":"","reason":"","result":"ApiTokenNotExists"}

进程已结束,退出代码为 0

广东省
浏览 153
收藏
1
分享
1 +1
1
+1
全部评论 1
 
清华学弟任泽岩
清华学弟任泽岩

创作者俱乐部成员

打卡学习!
· 陕西省
回复