我正在尝试编写Python脚本以与pCloudy的API配合使用,以自动上传apk并在设备上运行它们。目前,我正在尝试上传apk,但遇到错误404。
摘要
try:
files_data = {'file':open('./temp.apk','rb'),'source_type':'raw','token':user_token,'filter':'all'}
except FileNotFoundError:
print('unable to open the local file for uploading.')
files_response = requests.post('https://device.pcloudy.com/api/upload_file',files = files_data)
files_response_data = files_response.json()
print(files_response_data)
但是我会收到答复
{'result': {'error': '404'}}
感谢熟悉pCloudy的人的任何建议。
参考
https://content.pcloudy.com/apidocs/index.html?shell#introduction
https://github.com/pankyopkey/pCloudy-sample-projects/blob/master/Python/AndroidNative/Controller.py